Base revisions
[ntk/apt.git] / doc / apt-get.8
1 .\" $Id: apt-get.8,v 1.1 1998/07/02 02:58:12 jgg Exp $
2 .\" This manpage is copyright (C) 1998 Branden Robinson <branden@debian.org>.
3 .\"
4 .\" This is free software; you may redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2,
7 .\" or (at your option) any later version.
8 .\"
9 .\" This is distributed in the hope that it will be useful, but
10 .\" WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 .\" GNU General Public License for more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public
15 .\" License along with APT; if not, write to the Free Software
16 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 .\" 02111-1307 USA
18 .TH apt-get 8 "16 June 1998" "Debian GNU/Linux"
19 .SH NAME
20 apt-get \- APT package handling utility \(em command-line interface
21 .SH SYNOPSIS
22 .B apt-get
23 .RI [ options ]
24 .RI [ command ]
25 .RI [ package
26 .IR ... ]
27 .SH DESCRIPTION
28 .B apt-get
29 is the command-line tool for handling packages, and may be considered the
30 user's "back-end" to
31 .BR apt (8).
32 Use
33 .BR apt (8)
34 if the usage of apt-get does not seem intuitive.
35 .PP
36 .I command
37 is one of
38 .RS
39 .PD 0
40 .B update
41 .PP
42 .B upgrade
43 .PP
44 .B dselect-upgrade
45 .PP
46 .B dist-upgrade
47 .PP
48 .B install
49 .PP
50 .B check
51 .PP
52 .B clean
53 .RE
54 .PD 1
55 .PP
56 Unless one of the
57 .IR -h ,
58 .IR --help ,
59 .IR -f ,
60 or
61 .I --fix-broken
62 options is given, one of the above commands must be present. Only the
63 .B install
64 command requires any further arguments.
65 .SS update
66 .B update
67 is used to resynchronize the package overview files from their
68 sources. The overviews of available packages are fetched from the
69 location(s) specified in
70 .IR /etc/apt/sources.list .
71 For example, when using a Debian archive, this command retrieves and
72 scans the
73 .I Packages.gz
74 files, so that information about new and updated packages is available. An
75 .B update
76 should always be performed before an
77 .B upgrade
78 or
79 .BR dist-upgrade .
80 .SS upgrade
81 .B upgrade
82 is used to install the newest versions of all packages currently installed
83 on the system from the sources enumerated in
84 .IR /etc/apt/sources.list .
85 Packages currently installed with new versions available are retrieved
86 and upgraded; under no circumstances are currently installed packages
87 removed, or packages not already installed retrieved and installed. New
88 versions of currently installed packages that cannot be upgraded without
89 changing the install status of another package will be left at their
90 current version. An
91 .B update
92 must be performed first so that
93 .B apt-get
94 knows that new versions of packages are available.
95 .SS dselect-upgrade
96 .B dselect-upgrade
97 is used in conjunction with the traditional Debian GNU/Linux packaging
98 front-end,
99 .BR dselect (8). " dselect-upgrade"
100 follows the changes made by
101 .B dselect
102 to the
103 .I Status
104 field of available packages, and performs the actions necessary to realize
105 that state (for instance, the removal of old and the installation of new
106 packages).
107 .B dselect-upgrade
108 does not attempt to intelligently address dependency issues as
109 .B dist-upgrade
110 or
111 .B install
112 do. If any dependency problems arise,
113 .B apt-get
114 aborts without performing any of the actions requested, even those
115 without problems.
116 .B dselect-upgrade
117 is only useful to users of
118 .B dselect
119 and the
120 .I .deb
121 package file format. The
122 .I /etc/apt/sources.list
123 file contains a list of locations from which to retrieve desired package
124 files.
125 .SS dist-upgrade
126 .BR dist-upgrade ,
127 in addition to performing the function of
128 .BR upgrade ,
129 also intelligently handles changing dependencies with new versions of
130 packages;
131 .B apt-get
132 has a "smart" conflict resolution system, and it will attempt to upgrade
133 the most important packages at the expense of less important ones if
134 necessary. The
135 .I /etc/apt/sources.list
136 file contains a list of locations from which to retrieve desired package
137 files.
138 .SS install
139 .B install
140 is followed by one or more
141 .I packages
142 desired for installation. Each
143 .I package
144 is a package name, not a fully qualified filename (for instance, in a
145 Debian GNU/Linux system,
146 .I lsdo
147 would be the argument provided, not
148 .IR ldso_1.9.6-2.deb ).
149 All packages required by the package(s) specified for installation will
150 also be retrieved and installed. The
151 .I /etc/apt/sources.list
152 file is used to locate the desired packages. If a hyphen is appended to
153 the package name (with no intervening space), the identified package will
154 be removed if it is installed. This latter feature may be used to override
155 decisions made by apt-get's conflict resolution system.
156 .SS check
157 .B check
158 is a diagnostic tool; it updates the package cache and checks for broken
159 packages.
160 .SS clean
161 .B clean
162 clears out the local repository of retrieved package files. It removes
163 everything but the lock file from
164 .I /var/cache/apt/archives/
165 and
166 .IR /var/cache/apt/archives/partial/ .
167 When APT is used as a
168 .BR dselect (8)
169 method,
170 .B
171 clean
172 is run automatically. Those who do not use dselect will likely want to
173 run
174 .B
175 apt-get clean
176 from time to time to free up disk space.
177 .SH OPTIONS
178 .TP
179 .IR \-d , " --download-only"
180 Download only; package files are only retrieved, not unpacked or installed.
181 .TP
182 .IR \-f , " --fix-broken"
183 Fix; attempt to correct a system with broken dependencies in
184 place. This option may be used alone or in conjunction with any of the
185 command actions, and is sometimes necessary when running APT for the
186 first time; APT itself does not allow broken package dependencies to
187 exist on a system. It is possible that a system's dependency structure
188 can be so corrupt as to require manual intervention (which usually
189 means using dselect or dpkg --remove to eliminate some of the offending
190 packages). Use of this option together with -m is discouraged.
191 .TP
192 .IR \-h , " --help"
193 Help; display a helpful usage message and exit.
194 .TP
195 .IR \-m , " --ignore-missing"
196 Ignore missing packages; If packages cannot be retrieved or fail the
197 integrity check after retrieval (corrupted package files), hold back
198 those packages and handle the result. Use of this option together with
199 -f is discouraged.
200 .TP
201 .IR \-q , " --silent"
202 Quiet; produces output suitable for logging, omitting progress indicators.
203 .TP
204 .I \-qq
205 Very quiet; no output except for errors.
206 .TP
207 .IR \-s , " --simulate" , " --just-print" , " --dry-run" , " --recon " , " --no-act"
208 No action; perform a simulation of events that would occur but do not
209 actually change the system.
210 .TP
211 .IR \-y , " --yes" , " --assume-yes"
212 Automatic yes to prompts; assume "yes" as answer to all prompts and run
213 non-interactively.
214 .SH FILES
215 .TP
216 .I /etc/apt/sources.list
217 see
218 .BR sources.list (5)
219 .TP
220 .I /var/cache/apt/archives/
221 storage area for retrieved package files
222 .TP
223 .I /var/cache/apt/archives/partial/
224 storage area for package files in transit
225 .TP
226 .I /var/state/apt/lists/
227 storage area for state information for each package resource specified in
228 .I /etc/apt/sources.list
229 .TP
230 .I /var/state/apt/lists/partial/
231 storage area for state information in transit
232 .SH SEE ALSO
233 .BR apt (8),
234 .BR apt-cache (8),
235 .BR dpkg (8),
236 .BR dselect (8),
237 .BR sources.list (5)
238 .SH DIAGNOSTICS
239 apt-get returns zero on normal operation, decimal 100 on error.
240 .SH BUGS
241 See <http://www.debian.org/Bugs/db/pa/lapt.html>. If you wish to report a
242 bug in
243 .BR apt-get ,
244 please see
245 .I /usr/doc/debian/bug-reporting.txt
246 or the
247 .BR bug (1)
248 command.
249 .SH AUTHOR
250 apt-get was written by the APT team <apt@packages.debian.org>.