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