]>
Commit | Line | Data |
---|---|---|
de50f048 AL |
1 | mailto(apt@packages.debian.org) |
2 | manpage(apt-get)(8)(4 Dec 1998)(apt)() | |
3 | manpagename(apt-get)(APT package handling utility -- command-line interface) | |
4 | ||
5 | manpagesynopsis() | |
6 | apt-get [options] [command] [package ...] | |
7 | ||
8 | manpagedescription() | |
9 | ||
10 | apt-get is the command-line tool for handling packages, and may be considered | |
11 | the user's "back-end" to apt(8). | |
12 | ||
13 | em(command) is one of: | |
14 | itemize( | |
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] [...] | |
de50f048 AL |
21 | it() check |
22 | it() clean | |
b381f6ed | 23 | it() autoclean |
de50f048 AL |
24 | ) |
25 | ||
26 | Unless the -h, or --help option is given one of the above commands | |
09f2e026 | 27 | must be present. |
de50f048 AL |
28 | |
29 | startdit() | |
30 | dit(bf(update)) | |
31 | bf(update) is used to resynchronize the package overview files from their | |
32 | sources. The overviews of available packages are fetched from the | |
33 | location(s) specified in bf(/etc/apt/sources.list). | |
34 | For example, when using a Debian archive, this command retrieves and | |
35 | scans the bf(Packages.gz) files, so that information about new and updated | |
36 | packages is available. An bf(update) should always be performed before an | |
37 | bf(upgrade) bf(dist-upgrade). | |
38 | ||
39 | dit(bf(upgrade)) | |
40 | bf(upgrade) is used to install the newest versions of all packages currently | |
41 | installed on the system from the sources enumerated in | |
42 | bf(/etc/apt/sources.list). Packages currently installed with new versions | |
43 | available are retrieved and upgraded; under no circumstances are currently | |
44 | installed packages removed, or packages not already installed retrieved and | |
45 | installed. New versions of currently installed packages that cannot be | |
46 | upgraded without changing the install status of another package will be left | |
47 | at their current version. An bf(update) must be performed first so that | |
48 | bf(apt-get) knows that new versions of packages are available. | |
49 | ||
50 | dit(bf(dselect-upgrade)) | |
51 | bf(dselect-upgrade) | |
52 | is used in conjunction with the traditional Debian GNU/Linux packaging | |
53 | front-end, bf(dselect (8)). bf(dselect-upgrade) | |
54 | follows the changes made by bf(dselect) to the em(Status) | |
55 | field of available packages, and performs the actions necessary to realize | |
56 | that state (for instance, the removal of old and the installation of new | |
57 | ||
58 | dit(bf(dist-upgrade)) | |
59 | bf(dist-upgrade),in addition to performing the function of bf(upgrade), | |
60 | also intelligently handles changing dependencies with new versions of | |
61 | packages; bf(apt-get) has a "smart" conflict resolution system, and it will | |
62 | attempt to upgrade the most important packages at the expense of less | |
63 | important ones if necessary. The bf(/etc/apt/sources.list) file contains a | |
64 | list of locations from which to retrieve desired package files. | |
65 | ||
66 | dit(bf(install)) | |
67 | bf(install) is followed by one or more em(packages) desired for installation. | |
68 | Each em(package) is a package name, not a fully qualified filename | |
6d5dd02a | 69 | (for instance, in a Debian GNU/Linux system, em(ldso) would be the argument |
de50f048 AL |
70 | provided, not em(ldso_1.9.6-2.deb)). All packages required by the package(s) |
71 | specified for installation will also be retrieved and installed. The | |
72 | bf(/etc/apt/sources.list) file is used to locate the desired packages. If a | |
73 | hyphen is appended to the package name (with no intervening space), the | |
74 | identified package will be removed if it is installed. This latter feature | |
75 | may be used to override decisions made by apt-get's conflict resolution system. | |
76 | ||
09f2e026 AL |
77 | dit(bf(remove)) |
78 | bf(remove) is identical to bf(install) except that packages are removed | |
79 | instead of installed. If a plus sign is appended to the package name (with no | |
80 | intervening space), the identified package will be installed. | |
81 | ||
de50f048 AL |
82 | dit(bf(check)) |
83 | bf(check) is a diagnostic tool; it updates the package cache and checks for | |
84 | brokenpackages. | |
85 | ||
86 | dit(bf(clean)) | |
35c22def | 87 | bf(clean) clears out the local repository of retrieved package files. It |
de50f048 AL |
88 | removes everything but the lock file from bf(/var/cache/apt/archives/) |
89 | and bf(/var/cache/apt/archives/partial/). | |
90 | When APT is used as a bf(dselect(8)) method, bf(clean) is run automatically. | |
91 | Those who do not use dselect will likely want to run code(apt-get clean) | |
92 | from time to time to free up disk space. | |
b381f6ed AL |
93 | |
94 | dit(bf(autoclean)) | |
35c22def | 95 | Like bf(clean), bf(autoclean) clears out the local repository of retrieved |
b381f6ed AL |
96 | package files. The difference is that it only removes package files that |
97 | can no longer be downloaded, and are largely useless. This allows a | |
98 | cache to be maintained over a long period without it growing out of | |
99 | control. | |
100 | ||
de50f048 AL |
101 | enddit() |
102 | ||
103 | manpageoptions() | |
3d8fd174 AL |
104 | All command line options may be set using the configuration file, the |
105 | descriptions indicate the configuration option to set. For boolean | |
106 | options you can override the config file by using something like bf(-f-), | |
107 | bf(--no-f), bf(-f=no) or several other variations. | |
de50f048 AL |
108 | |
109 | startdit() | |
110 | dit(bf(-d, --download-only)) | |
111 | Download only; package files are only retrieved, not unpacked or installed. | |
3d8fd174 | 112 | See bf(APT::Get::Download-Only). |
de50f048 AL |
113 | |
114 | dit(bf(-f, --fix-broken)) | |
115 | Fix; attempt to correct a system with broken dependencies in | |
116 | place. This option may be used alone or in conjunction with any of the | |
117 | command actions, and is sometimes necessary when running APT for the | |
118 | first time; APT itself does not allow broken package dependencies to | |
119 | exist on a system. It is possible that a system's dependency structure | |
120 | can be so corrupt as to require manual intervention (which usually | |
121 | means using dselect or dpkg --remove to eliminate some of the offending | |
122 | packages). Use of this option together with -m may produce an error in | |
3d8fd174 | 123 | some situations. See bf(APT::Get::Fix-Broken). |
de50f048 AL |
124 | |
125 | dit(bf(-h, --help)) | |
126 | Help; display a helpful usage message and exits. | |
127 | ||
04aa15a8 AL |
128 | dit(bf(-v, --version)) |
129 | Show the program verison. | |
130 | ||
72f16ed2 | 131 | dit(bf(-m, --ignore-missing, --fix-missing)) |
de50f048 AL |
132 | Ignore missing packages; If packages cannot be retrieved or fail the |
133 | integrity check after retrieval (corrupted package files), hold back | |
134 | those packages and handle the result. Use of this option together with | |
d59cbe7f | 135 | -f may produce an error in some situations. See bf(ignore-missing). |
de50f048 | 136 | |
09f2e026 | 137 | dit(bf(-q, --quiet)) |
de50f048 | 138 | Quiet; produces output suitable for logging, omitting progress indicators. |
0c95c765 AL |
139 | More qs will produce more quiet up to a maximum of 2. You can also use |
140 | bf(-q=#) to set the quiet level, overriding the configuration file. Note that | |
141 | quiet level 2 implies -y, you should never use -qq without a no-action | |
142 | modifier such as -d, --print-uris or -s as APT may decided to do something | |
143 | you did not expect. | |
3d8fd174 | 144 | See bf(quiet) |
de50f048 AL |
145 | |
146 | dit(bf(-s, --simulate, --just-print, --dry-run, --recon, --no-act)) | |
147 | No action; perform a simulation of events that would occur but do not | |
5c2cb6e4 AL |
148 | actually change the system. See bf(APT::Get::Simulate). Simulate prints out |
149 | a series of lines each one representing a dpkg operation, Configure (Conf), | |
150 | Remove (Remv), Unpack (Inst). Square brackets indicate broken packages with | |
151 | and empty set of square brackets meaning breaks that are of no consequence | |
152 | (rare). | |
de50f048 AL |
153 | |
154 | dit(bf(-y, --yes, --assume-yes)) | |
155 | Automatic yes to prompts; assume "yes" as answer to all prompts and run | |
156 | non-interactively. If an undesireable situation, such as changing a held | |
157 | package or removing an essential package occures then bf(apt-get) will | |
3d8fd174 | 158 | abort. See bf(APT::Get::Assume-Yes). |
de50f048 AL |
159 | |
160 | dit(bf(-u, --show-upgraded)) | |
161 | Show upgraded packages; Print out a list of all packages that are to be | |
3d8fd174 | 162 | upgraded. See bf(APT::Get::Show-Upgraded). |
de50f048 AL |
163 | |
164 | dit(bf(--ignore-hold)) | |
165 | Ignore package Holds; This causes bf(apt-get) to ignore a hold placed on | |
166 | a package. This may be usefull in conjunction with bf(dist-upgrade) to | |
3d8fd174 | 167 | override a large number of undesired holds. See bf(APT::Ingore-Hold). |
de50f048 AL |
168 | |
169 | dit(bf(--no-upgrade)) | |
170 | Do not upgrade packages; When used in conjunction with bf(install) | |
171 | bf(no-upgrade) will prevent packages listed from being upgraded if they | |
3d8fd174 | 172 | are already installed. See bf(APT::Get::no-upgrade). |
de50f048 AL |
173 | |
174 | dit(bf(--force-yes)) | |
175 | Force yes; This is a dangerous option that will cause apt to continue without | |
176 | prompting if it is doing something potentially harmfull. It should not be used | |
177 | except in very special situations. Using bf(force-yes) can potentially destroy | |
3d8fd174 | 178 | your system! See bf(APT::Get::force-yes). |
de50f048 | 179 | |
f7a08e33 AL |
180 | dit(bf(--print-uris)) |
181 | Instead of fetching the files to install their URIs are printed. Each | |
182 | URI will have the path, the destination file name, the size and the expected | |
183 | md5 hash. Note that the file name to write to will not always match | |
184 | the file name on the remote site! See bf(APT::Get::Print-URIs). | |
185 | ||
de50f048 AL |
186 | dit(bf(-c, --config-file)) |
187 | Configuration File; Specify a configuration file to use. bf(apt-get) will | |
188 | read the default configuration file and then this configuration file. See | |
189 | bf(apt.conf(5)) for syntax information. | |
190 | ||
191 | dit(bf(-o, --option)) | |
192 | Set a Configuration Option; This will set an arbitary configuration option. | |
193 | The syntax is | |
194 | verb(-o Foo::Bar=bar) | |
09f2e026 | 195 | enddit() |
de50f048 AL |
196 | |
197 | manpagefiles() | |
198 | itemize( | |
199 | it() /etc/apt/sources.list | |
200 | locations to fetch packages from | |
201 | ||
202 | it() /var/cache/apt/archives/ | |
203 | storage area for retrieved package files | |
204 | ||
205 | it() /var/cache/apt/archives/partial/ | |
206 | storage area for package files in transit | |
207 | ||
208 | it() /var/state/apt/lists/ | |
209 | storage area for state information for each package resource specified in | |
210 | ||
211 | it() /var/state/apt/lists/partial/ | |
212 | storage area for state information in transit | |
213 | ) | |
214 | ||
215 | manpageseealso() | |
09f2e026 AL |
216 | apt-cache(8), |
217 | dpkg(8), | |
218 | dselect(8), | |
219 | sources.list(5), | |
3d8fd174 | 220 | apt.conf(5), |
09f2e026 | 221 | The APT Users Guide in /usr/doc/apt/ |
de50f048 AL |
222 | |
223 | manpagediagnostics() | |
224 | apt-get returns zero on normal operation, decimal 100 on error. | |
225 | ||
226 | manpagebugs() | |
d59cbe7f | 227 | See http://bugs.debian.org/apt. If you wish to report a |
de50f048 AL |
228 | bug in bf(apt-get), please see bf(/usr/doc/debian/bug-reporting.txt) |
229 | or the bf(bug(1)) command. | |
230 | ||
231 | manpageauthor() | |
232 | apt-get was written by the APT team <apt@packages.debian.org>. |