]> git.saurik.com Git - apt.git/blame - doc/apt-get.8.yo
Undid undoing for bug 65952, fix is in aliencode
[apt.git] / doc / apt-get.8.yo
CommitLineData
de50f048
AL
1mailto(apt@packages.debian.org)
2manpage(apt-get)(8)(4 Dec 1998)(apt)()
3manpagename(apt-get)(APT package handling utility -- command-line interface)
4
5manpagesynopsis()
6 apt-get [options] [command] [package ...]
7
8manpagedescription()
9
10apt-get is the command-line tool for handling packages, and may be considered
11the user's "back-end" to apt(8).
12
13em(command) is one of:
14itemize(
15 it() update
16 it() upgrade
17 it() dselect-upgrade
18 it() dist-upgrade
09f2e026
AL
19 it() install package1 [package2] [...]
20 it() remove package1 [package2] [...]
4994560c 21 it() source package1 [package2] [...]
de50f048
AL
22 it() check
23 it() clean
b381f6ed 24 it() autoclean
de50f048
AL
25)
26
27Unless the -h, or --help option is given one of the above commands
09f2e026 28must be present.
de50f048
AL
29
30startdit()
31dit(bf(update))
32bf(update) is used to resynchronize the package overview files from their
33sources. The overviews of available packages are fetched from the
34location(s) specified in bf(/etc/apt/sources.list).
35For example, when using a Debian archive, this command retrieves and
36scans the bf(Packages.gz) files, so that information about new and updated
37packages is available. An bf(update) should always be performed before an
4994560c
AL
38bf(upgrade) bf(dist-upgrade). Please be aware that the overall progress
39meter will be incorrect as the size of the package files cannot be known in
40advance.
de50f048
AL
41
42dit(bf(upgrade))
43bf(upgrade) is used to install the newest versions of all packages currently
44installed on the system from the sources enumerated in
45bf(/etc/apt/sources.list). Packages currently installed with new versions
46available are retrieved and upgraded; under no circumstances are currently
47installed packages removed, or packages not already installed retrieved and
48installed. New versions of currently installed packages that cannot be
49upgraded without changing the install status of another package will be left
50at their current version. An bf(update) must be performed first so that
51bf(apt-get) knows that new versions of packages are available.
52
53dit(bf(dselect-upgrade))
54bf(dselect-upgrade)
55is used in conjunction with the traditional Debian GNU/Linux packaging
56front-end, bf(dselect (8)). bf(dselect-upgrade)
57follows the changes made by bf(dselect) to the em(Status)
58field of available packages, and performs the actions necessary to realize
59that state (for instance, the removal of old and the installation of new
2c0c53b3 60packages).
de50f048
AL
61
62dit(bf(dist-upgrade))
63bf(dist-upgrade),in addition to performing the function of bf(upgrade),
64also intelligently handles changing dependencies with new versions of
65packages; bf(apt-get) has a "smart" conflict resolution system, and it will
66attempt to upgrade the most important packages at the expense of less
67important ones if necessary. The bf(/etc/apt/sources.list) file contains a
68list of locations from which to retrieve desired package files.
69
70dit(bf(install))
71bf(install) is followed by one or more em(packages) desired for installation.
72Each em(package) is a package name, not a fully qualified filename
6d5dd02a 73(for instance, in a Debian GNU/Linux system, em(ldso) would be the argument
de50f048
AL
74provided, not em(ldso_1.9.6-2.deb)). All packages required by the package(s)
75specified for installation will also be retrieved and installed. The
76bf(/etc/apt/sources.list) file is used to locate the desired packages. If a
77hyphen is appended to the package name (with no intervening space), the
78identified package will be removed if it is installed. This latter feature
79may be used to override decisions made by apt-get's conflict resolution system.
80
c373c37a
AL
81If no package matches the given expression and the expression contains one
82of '.', '?' or '*' then it is assumed to be a POSIX regex and it is applied
83to all package names in the database. Any matches are then installed (or
648e3cb4
AL
84removed). Note that matching is done by substring so 'lo*' matches 'how-lo'
85and 'lowest'. If this is undesired prefix with a '^' character.
c373c37a 86
09f2e026
AL
87dit(bf(remove))
88bf(remove) is identical to bf(install) except that packages are removed
89instead of installed. If a plus sign is appended to the package name (with no
90intervening space), the identified package will be installed.
91
4994560c
AL
92dit(bf(source))
93bf(source) causes apt-get to fetch source packages. APT will examine the
94available packages to decide which source package to fetch. It will then
95find and download into the current directory the newest available version of
c1e78ee5 96that source package. Source packages are tracked separately from binary
4a6a69b5 97packages via bf(deb-src) type lines in the bf(/etc/apt/sources.list) file.
4994560c 98This probably will mean that you will not get the same source as the package
fb0ee66e
AL
99you have installed or as you could install. If the --compile options is
100specified then the package will be compiled to a binary .deb using
101dpkg-buildpackage, if --download-only is specified then the source package
102will not be unpacked.
4994560c 103
d385e2e8
AL
104Note that source packages are not tracked like binary packages, they exist
105only in the current directory and are similar to downloading source
106tar balls.
107
de50f048
AL
108dit(bf(check))
109bf(check) is a diagnostic tool; it updates the package cache and checks for
c1e78ee5 110broken packages.
de50f048
AL
111
112dit(bf(clean))
35c22def 113bf(clean) clears out the local repository of retrieved package files. It
de50f048
AL
114removes everything but the lock file from bf(/var/cache/apt/archives/)
115and bf(/var/cache/apt/archives/partial/).
116When APT is used as a bf(dselect(8)) method, bf(clean) is run automatically.
117Those who do not use dselect will likely want to run code(apt-get clean)
118from time to time to free up disk space.
b381f6ed
AL
119
120dit(bf(autoclean))
35c22def 121Like bf(clean), bf(autoclean) clears out the local repository of retrieved
b381f6ed
AL
122package files. The difference is that it only removes package files that
123can no longer be downloaded, and are largely useless. This allows a
124cache to be maintained over a long period without it growing out of
125control.
126
de50f048
AL
127enddit()
128
129manpageoptions()
3d8fd174
AL
130All command line options may be set using the configuration file, the
131descriptions indicate the configuration option to set. For boolean
132options you can override the config file by using something like bf(-f-),
133bf(--no-f), bf(-f=no) or several other variations.
de50f048
AL
134
135startdit()
136dit(bf(-d, --download-only))
137Download only; package files are only retrieved, not unpacked or installed.
83ab33fc 138Configuration Item: bf(APT::Get::Download-Only).
de50f048
AL
139
140dit(bf(-f, --fix-broken))
141Fix; attempt to correct a system with broken dependencies in
7e4fd488
AL
142place. This option, when used with install/remove, can omit any packages
143to permit APT to deduce a likely soltion. Any Package that are specified
144must completly correct the problem. The option is sometimes necessary when
145running APT for the first time; APT itself does not allow broken package
146dependencies to exist on a system. It is possible that a system's
147dependency structure can be so corrupt as to require manual intervention
148(which usually means using dselect or dpkg --remove to eliminate some of
149the offending packages). Use of this option together with -m may produce an
150error in some situations. Configuration Item: bf(APT::Get::Fix-Broken).
de50f048
AL
151
152dit(bf(-h, --help))
153Help; display a helpful usage message and exits.
154
04aa15a8 155dit(bf(-v, --version))
c1e78ee5 156Show the program version.
04aa15a8 157
72f16ed2 158dit(bf(-m, --ignore-missing, --fix-missing))
de50f048
AL
159Ignore missing packages; If packages cannot be retrieved or fail the
160integrity check after retrieval (corrupted package files), hold back
161those packages and handle the result. Use of this option together with
a3eaf954
AL
162-f may produce an error in some situations. If a package is selected for
163installation (particularly if it is mentioned on the command line) and it
164could not be downloaded then it will be silently held back.
165Configuration Item: bf(APT::Get::ignore-missing).
de50f048 166
ab559b35
AL
167dit(bf(--no-download))
168Disables downloading of packages. This is best used with --ignore-missing to
169force APT to use only the .debs it has already downloaded.
a3eaf954 170Configuration Item: bf(APT::Get::No-Download).
ab559b35 171
09f2e026 172dit(bf(-q, --quiet))
de50f048 173Quiet; produces output suitable for logging, omitting progress indicators.
c1e78ee5 174More q's will produce more quiet up to a maximum of 2. You can also use
0c95c765
AL
175bf(-q=#) to set the quiet level, overriding the configuration file. Note that
176quiet level 2 implies -y, you should never use -qq without a no-action
177modifier such as -d, --print-uris or -s as APT may decided to do something
178you did not expect.
83ab33fc 179Configuration Item: bf(quiet)
de50f048
AL
180
181dit(bf(-s, --simulate, --just-print, --dry-run, --recon, --no-act))
182No action; perform a simulation of events that would occur but do not
83ab33fc
AL
183actually change the system. Configuration Item: bf(APT::Get::Simulate).
184
185Simulate prints out
5c2cb6e4
AL
186a series of lines each one representing a dpkg operation, Configure (Conf),
187Remove (Remv), Unpack (Inst). Square brackets indicate broken packages with
188and empty set of square brackets meaning breaks that are of no consequence
189(rare).
de50f048
AL
190
191dit(bf(-y, --yes, --assume-yes))
192Automatic yes to prompts; assume "yes" as answer to all prompts and run
c1e78ee5
AL
193non-interactively. If an undesirable situation, such as changing a held
194package or removing an essential package occurs then bf(apt-get) will
83ab33fc 195abort. Configuration Item: bf(APT::Get::Assume-Yes).
de50f048
AL
196
197dit(bf(-u, --show-upgraded))
198Show upgraded packages; Print out a list of all packages that are to be
83ab33fc 199upgraded. Configuration Item: bf(APT::Get::Show-Upgraded).
de50f048 200
fb0ee66e
AL
201dit(bf(-b, --compile, --build))
202Compile source packages after downloading them.
a3eaf954 203Configuration Item: bf(APT::Get::Compile).
fb0ee66e 204
de50f048
AL
205dit(bf(--ignore-hold))
206Ignore package Holds; This causes bf(apt-get) to ignore a hold placed on
c1e78ee5 207a package. This may be useful in conjunction with bf(dist-upgrade) to
83ab33fc 208override a large number of undesired holds. Configuration Item: bf(APT::Ignore-Hold).
de50f048
AL
209
210dit(bf(--no-upgrade))
211Do not upgrade packages; When used in conjunction with bf(install)
212bf(no-upgrade) will prevent packages listed from being upgraded if they
83ab33fc 213are already installed. Configuration Item: bf(APT::Get::no-upgrade).
de50f048
AL
214
215dit(bf(--force-yes))
216Force yes; This is a dangerous option that will cause apt to continue without
c1e78ee5 217prompting if it is doing something potentially harmful. It should not be used
de50f048 218except in very special situations. Using bf(force-yes) can potentially destroy
83ab33fc 219your system! Configuration Item: bf(APT::Get::force-yes).
de50f048 220
f7a08e33
AL
221dit(bf(--print-uris))
222Instead of fetching the files to install their URIs are printed. Each
223URI will have the path, the destination file name, the size and the expected
224md5 hash. Note that the file name to write to will not always match
4994560c 225the file name on the remote site! This also works with the bf(source)
83ab33fc 226command. Configuration Item: bf(APT::Get::Print-URIs).
f7a08e33 227
fc4b5c9f
AL
228dit(bf(--purge))
229Use purge instead of remove for anything that would be removed.
a3eaf954 230Configuration Item: bf(APT::Get::Purge).
fc4b5c9f 231
d0c59649
AL
232dit(bf(--reinstall))
233Re-Install packages that are already installed and at the newest version.
234
9df71a5b
AL
235dit(bf(--list-cleanup))
236This option defaults to on, use bf(--no-list-cleanup) to turn it off.
237When on apt-get will automatically manage the contents of
238/var/state/apt/lists to ensure that obsolete files are erased. The only
83ab33fc
AL
239reason to turn it off is if you frequently change your source list.
240Configuration Item: bf(APT::Get::List-Cleanup)
17c0e8e1 241
d150b09d
AL
242dit(bf(--trivial-only))
243Only perform operations are 'trivial'. Logically this can be considered
244related to --assume-yes, where --assume-yes will answer yes to any prompt,
83ab33fc 245--trivial-only will answer no. Configuration Item: bf(APT::Get::Trivial-Only)
d150b09d
AL
246
247dit(bf(--no-remove))
248If any packages are to be removed apt-get immediately aborts without
83ab33fc 249prompting. Configuration Item: bf(APT::Get::No-Remove)
d150b09d 250
a3eaf954 251dit(bf(--diff-only), bf(--tar-only))
83ab33fc
AL
252Download only the diff or tar file of a source archive.
253Configuration Item: bf(APT::Get::Diff-Only)
9df71a5b 254
de50f048
AL
255dit(bf(-c, --config-file))
256Configuration File; Specify a configuration file to use. bf(apt-get) will
257read the default configuration file and then this configuration file. See
258bf(apt.conf(5)) for syntax information.
259
260dit(bf(-o, --option))
c1e78ee5 261Set a Configuration Option; This will set an arbitrary configuration option.
de50f048
AL
262The syntax is
263verb(-o Foo::Bar=bar)
09f2e026 264enddit()
de50f048
AL
265
266manpagefiles()
267itemize(
268 it() /etc/apt/sources.list
269 locations to fetch packages from
270
271 it() /var/cache/apt/archives/
272 storage area for retrieved package files
273
274 it() /var/cache/apt/archives/partial/
275 storage area for package files in transit
276
277 it() /var/state/apt/lists/
278 storage area for state information for each package resource specified in
2c0c53b3 279 the source list
de50f048
AL
280
281 it() /var/state/apt/lists/partial/
282 storage area for state information in transit
283)
284
285manpageseealso()
09f2e026
AL
286apt-cache(8),
287dpkg(8),
288dselect(8),
289sources.list(5),
3d8fd174 290apt.conf(5),
09f2e026 291The APT Users Guide in /usr/doc/apt/
de50f048
AL
292
293manpagediagnostics()
294apt-get returns zero on normal operation, decimal 100 on error.
295
296manpagebugs()
d59cbe7f 297See http://bugs.debian.org/apt. If you wish to report a
de50f048
AL
298bug in bf(apt-get), please see bf(/usr/doc/debian/bug-reporting.txt)
299or the bf(bug(1)) command.
300
301manpageauthor()
302apt-get was written by the APT team <apt@packages.debian.org>.