1APT-GET(8)                          apt-get                         APT-GET(8)
2
3
4

NAME

6       apt-get - APT package handling utility - command-line interface
7

SYNOPSIS

9       apt-get [options] [-o config=string] [-c=cfgfile] command [pkg]
10
11

DESCRIPTION

13       apt-get is the command-line tool for handling packages, and may be con‐
14       sidered the user's "back-end" to other tools  using  the  APT  library.
15       Several "front-end" interfaces exist, such as synaptic and aptitude.
16
17

COMMANDS

19       Unless  the  -h,  or  --help option is given, one of the commands below
20       must be present.
21
22
23       update Used to  re-synchronize  the  package  index  files  from  their
24              sources.  The indexes of available packages are fetched from the
25              location(s) specified in  /etc/apt/sources.list(5).   An  update
26              should always be performed before an upgrade or dist-upgrade.
27
28
29       upgrade
30              Used  to  install  the newest versions of all packages currently
31              installed  on  the  system  from  the  sources   enumerated   in
32              /etc/apt/sources.list(5).  Packages currently installed with new
33              versions available are retrieved and upgraded; under no  circum‐
34              stances  are currently installed packages removed, nor are pack‐
35              ages that are not already  installed  retrieved  and  installed.
36              New  versions  of  currently  installed  packages that cannot be
37              upgraded without changing the install status of another  package
38              will  be  left at their current version.  An update must be per‐
39              formed first so that apt-get knows that new versions of packages
40              are available.
41
42
43       dist-upgrade
44              In  addition  to performing the function of upgrade, this option
45              also intelligently handles changing dependencies with  new  ver‐
46              sions  of  packages;  apt-get  has a "smart" conflict resolution
47              system, and it will attempt to upgrade the most important  pack‐
48              ages at the expense of less important ones, if necessary.
49
50              The  /etc/apt/sources.list(5)  file contains a list of locations
51              from  which  to  retrieve  desired  package  files.   See   also
52              apt_preferences(5)  for  a mechanism for over-riding the general
53              settings for individual packages.
54
55
56       install pkg(s)
57              This option is followed by one  or  more  packages  desired  for
58              installation.  Each package is a package name, not a fully qual‐
59              ified filename (for instance, in a  Fedora  Core  system,  glibc
60              would be the argument provided, not glibc-2.4.8.i686.rpm).
61
62              All  packages required by the package(s) specified for installa‐
63              tion   will   also   be   retrieved    and    installed.     The
64              /etc/apt/sources.list(5) file is used to locate the repositories
65              for the desired packages.  If a hyphen (-) is  appended  to  the
66              package name (with no intervening space), the identified package
67              will be removed if it is currently installed.  Similarly a  plus
68              sign  (+)  can be used to designate a package to install.  These
69              latter features may be used to override decisions made  by  apt-
70              get's conflict resolution system.
71
72              A specific version of a package can be selected for installation
73              by following the package name with an equals (=) and the version
74              of  the  package  to select.  This will cause that version to be
75              located and selected for  install.   Alternatively,  a  specific
76              distribution  can be selected by following the package name with
77              a slash (/) and the version of the distribution or  the  Archive
78              name (i.e.  stable, testing, unstable).
79
80              Both  of the version selection mechanisms can downgrade packages
81              and must be used with care.
82
83              Finally, the apt_preferences(5) mechanism allows you  to  create
84              an alternative installation policy for individual packages.
85
86              If  no  package  matches the given expression and the expression
87              contains one of ".", "?" or "*" then it is assumed to be a POSIX
88              regular  expression,  and  it is applied to all package names in
89              the database.  Any matches  are  then  installed  (or  removed).
90              Note that matching is done by substring so "lo.*"  matches "how-
91              lo" and "lowest".  If this  is  undesired,  anchor  the  regular
92              expression  with  a  "^" or "$" character, or create a more spe‐
93              cific regular expression.
94
95
96       remove pkg(s)
97              Identical to install except that packages are removed instead of
98              installed.  If  a  plus sign (+) is appended to the package name
99              (with no intervening space),  the  identified  package  will  be
100              installed instead of removed.
101
102
103       source source_pkg
104              Causes  apt-get  to fetch source packages.  APT will examine the
105              available packages to decide which source package to fetch.   It
106              will  then find and download into the current directory the new‐
107              est available version of that source package.   Source  packages
108              are  tracked  separately  from  binary packages via rpm-src type
109              lines in the sources.list(5) file.  This probably will mean that
110              you  will  not  get  the  same  source  as  the package you have
111              installed, or could install.  If the --compile options is speci‐
112              fied  then  the  package will be compiled to a binary using rpm‐
113              build, if --download-only is specified then the  source  package
114              will not be unpacked.
115
116              A  specific  source  version  can  be retrieved by following the
117              source name with an equals (=) and then the  version  to  fetch,
118              similar  to  the  mechanism  used  for  the package files.  This
119              enables exact matching of the source package name  and  version,
120              implicitly enabling the APT::Get::Only-Source option.
121
122              Note  that source packages are not tracked like binary packages,
123              they exist only in the current  directory  and  are  similar  to
124              downloading source tar balls.
125
126
127       build-dep source_pkg
128              Causes  apt-get to install/remove packages in an attempt to sat‐
129              isfy the build dependencies for a source package.
130
131
132       check  Diagnostic tool; it updates the package  cache  and  checks  for
133              broken dependencies.
134
135
136       clean  Clears  out the local repository of retrieved package files.  It
137              removes everything but the  lock  file  from  /var/cache/apt/ar‐
138              chives/ and /var/cache/apt/archives/partial/.
139
140
141       autoclean
142              Like  clean,  autoclean  clears  out  the  local  repository  of
143              retrieved package files.  The difference is that it only removes
144              package  files that can no longer be downloaded, and are largely
145              useless.  This allows a cache  to  be  maintained  over  a  long
146              period  of time without it growing out of control.  The configu‐
147              ration option APT::Clean-Installed will prevent installed  pack‐
148              ages from being erased if it is set to off.
149
150

OPTIONS

152       All  command-line  options may be set using the configuration file, the
153       descriptions indicate the configuration option  to  set.   For  boolean
154       options  you  can override the config file by using something like -f-,
155       --no-f, -f=no or several other variations.
156
157
158       -d, --download-only
159              Download only; package files are only retrieved, not unpacked or
160              installed.
161
162              Configuration Item: APT::Get::Download-Only.
163
164
165       -f, --fix-broken
166              Fix.   Attempt  to  correct a system with broken dependencies in
167              place.  This option, when used with install/remove, can omit any
168              packages  to  permit APT to deduce a likely solution.  Any pack‐
169              age(s) that are specified must completely correct  the  problem.
170              This  option  is  sometimes  necessary  when running APT for the
171              first time; APT itself does not allow broken  package  dependen‐
172              cies  to  exist  on  a  system.   It is possible that a system's
173              dependency structure can be so  corrupt  as  to  require  manual
174              intervention.   Use  of this option together with -m may produce
175              an error in some situations.
176
177              Configuration Item: APT::Get::Fix-Broken.
178
179
180       -m, --ignore-missing, --fix-missing
181              Ignore missing packages.  If packages  cannot  be  retrieved  or
182              fail  the  integrity  check  after  retrieval (corrupted package
183              files), hold back those packages and handle the result.  Use  of
184              this option together with -f may produce an error in some situa‐
185              tions.  If a package is selected for installation  (particularly
186              if  it  is  mentioned  on  the command-line) and it could not be
187              downloaded then it will be silently held back.
188
189              Configuration Item: APT::Get::Fix-Missing.
190
191
192       --no-download
193              Disables downloading  of  packages.   This  is  best  used  with
194              --ignore-missing  to  force  APT  to  use  only  the rpms it has
195              already downloaded.
196
197              Configuration Item: APT::Get::Download.
198
199
200       -q, --quiet
201              Quiet.  Produces output suitable for logging, omitting  progress
202              indicators.  More q's will produce more quiet up to a maximum of
203              two.  You can also use -q=# to set the quiet  level,  overriding
204              the configuration file.  Note that quiet level 2 implies -y, you
205              should never use -qq without a no-action modifier  such  as  -d,
206              --print-uris  or  -s  as APT may decided to do something you did
207              not expect.
208
209              Configuration Item: quiet.
210
211
212       -s, --simulate, --just-print, --dry-run, --recon, --no-act
213              No action.  Perform a simulation of events that would occur  but
214              do not actually change the system.
215
216              Configuration Item: APT::Get::Simulate.
217
218              Simulate  prints out a series of lines, each one representing an
219              rpm operation: Configure (Conf), Remove (Remv),  Unpack  (Inst).
220              Square  brackets  indicate  broken packages with an empty set of
221              square brackets  meaning  breaks  that  are  of  no  consequence
222              (rare).
223
224
225       -y, --yes, --assume-yes
226              Automatic yes to prompts.  Assume "yes" as answer to all prompts
227              and run non-interactively.  If an undesirable situation, such as
228              changing a held package or removing an essential package, occurs
229              then apt-get will abort.
230
231              Configuration Item: APT::Get::Assume-Yes.
232
233
234       -u, --show-upgraded
235              Show upgraded packages.  Print out a list of all  packages  that
236              are to be upgraded.
237
238              Configuration Item: APT::Get::Show-Upgraded.
239
240
241       -V, --verbose-versions
242              Show full versions for upgraded and installed packages.
243
244              Configuration Item: APT::Get::Show-Versions.
245
246
247       -b, --compile, --build
248              Compile source packages after downloading them.
249
250              Configuration Item: APT::Get::Compile.
251
252
253       --ignore-hold
254              Ignore  package  Holds.   This  causes  apt-get to ignore a hold
255              placed on a package.  This may be  useful  in  conjunction  with
256              dist-upgrade to override a large number of undesired holds.
257
258              Configuration Item: APT::Ignore-Hold.
259
260
261       --no-upgrade
262              Do not upgrade packages.  When used in conjunction with install,
263              no-upgrade will prevent packages listed from being  upgraded  if
264              they are already installed.
265
266              Configuration Item: APT::Get::Upgrade.
267
268
269       --force-yes
270              Force  yes.   This is a dangerous option that will cause apt-get
271              to continue without prompting if it is  doing  something  poten‐
272              tially  harmful.   It  should not be used except in very special
273              situations.  Using --force-yes can potentially destroy your sys‐
274              tem!
275
276              Configuration Item: APT::Get::force-yes.
277
278
279       --print-uris
280              Instead  of  fetching  the  files  to  install,  their  URIs are
281              printed.  Each URI will have  the  path,  the  destination  file
282              name,  the  size  and the expected md5 hash.  Note that the file
283              name to write to will not always match  the  file  name  on  the
284              remote  site!  This  also  works with the source and update com‐
285              mands.  When used with the update command, the MD5 and size  are
286              not  included,  and  it is up to the user to decompress any com‐
287              pressed files.
288
289              Configuration Item: APT::Get::Print-URIs.
290
291
292       --reinstall
293              Re-Install packages that are already installed and at the newest
294              version.
295
296              Configuration Item: APT::Get::ReInstall.
297
298
299       --list-cleanup
300              This  option  defaults  to  on, use --no-list-cleanup to turn it
301              off.  When on, apt-get will automatically manage the contents of
302              /var/lib/apt/lists  to  ensure  that  obsolete files are erased.
303              The only reason to turn it off is if you frequently change  your
304              source list.
305
306              Configuration Item: APT::Get::List-Cleanup.
307
308
309       -t, --target-release, --default-release
310              This option controls the default input to the policy engine.  It
311              creates a default  pin  at  priority  990  using  the  specified
312              release  string.  The preferences file may further override this
313              setting.  In short, this option lets  you  have  simple  control
314              over  which  distribution packages will be retrieved from.  Some
315              common examples might be -t '2.1*' or -t unstable.
316
317              Configuration Item: APT::Default-Release; see also the apt_pref‐
318              erences(5) manual page.
319
320
321       --trivial-only
322              Only  perform operations that are "trivial".  Logically this can
323              be considered related to --assume-yes.  Where --assume-yes  will
324              answer yes to any prompt, --trivial-only will answer no.
325
326              Configuration Item: fIAPT::Get::Trivial-Only.
327
328
329       --no-remove
330              If  any  packages  are  to be removed apt-get immediately aborts
331              without prompting.
332
333              Configuration Item: APT::Get::Remove.
334
335
336       --only-source
337              Only has meaning for the source  command.   Indicates  that  the
338              given  source  names are not to be mapped through the binary ta‐
339              ble.  This means that if this option is  specified,  the  source
340              command  will  only  accept  source  package names as arguments,
341              rather than accepting binary package names and  looking  up  the
342              corresponding source package.
343
344              Configuration Item: APT::Get::Only-Source.
345
346
347       -h, --help
348              Show a short usage summary.
349
350
351       -v, --version
352              Show the program version.
353
354
355       -c, --config-file
356              Configuration  File.   Specify a configuration file to use.  The
357              program will read the default configuration file and  then  this
358              configuration file.  See apt.conf(5) for syntax information.
359
360
361       -o, --option
362              Set a Configuration Option.  This will set an arbitrary configu‐
363              ration option.  The syntax is -o Foo::Bar=bar.
364
365

FILES

367       /etc/apt/sources.list
368              Locations to fetch packages from.
369
370              Configuration Item: Dir::Etc::SourceList.
371
372
373       /etc/apt/apt.conf
374              APT configuration file.
375
376              Configuration Item: Dir::Etc::Main.
377
378
379       /etc/apt/apt.conf.d/
380              APT configuration file fragments.
381
382              Configuration Item: Dir::Etc::Parts.
383
384
385       /etc/apt/preferences
386              Version preferences file.  This is where you would specify "pin‐
387              ning",  i.e.   a preference to get certain packages from a sepa‐
388              rate source or from a different version of a distribution.
389
390              Configuration Item: Dir::Etc::Preferences.
391
392
393       /var/cache/apt/archives/
394              Storage area for retrieved package files.
395
396              Configuration Item: Dir::Cache::Archives.
397
398
399       /var/cache/apt/archives/partial/
400              Storage area for package files in transit.
401
402              Configuration Item: Dir::Cache::Archives (implicit partial).
403
404
405       /var/lib/apt/lists/
406              Storage area for state information  for  each  package  resource
407              specified in sources.list(5).
408
409              Configuration Item: Dir::State::Lists.
410
411
412       /var/lib/apt/lists/partial/
413              Storage area for state information in transit.
414
415              Configuration Item: Dir::State::Lists (implicit partial).
416
417

SEE ALSO

419       apt-cache(8), apt-cdrom(8), sources.list(5), apt.conf(5),
420       apt-config(8), apt_preferences(5)
421
422

DIAGNOSTICS

424       apt-get returns zero on normal operation, decimal 100 on error.
425
426

BUGS

428       Reporting  bugs  in  APT-RPM is best done in the APT-RPM mailinglist at
429       http://apt-rpm.org/mailinglist.shtml.
430
431

AUTHOR

433       Maintainer and contributor information can be found in the credits page
434       http://apt-rpm.org/about.shtml of APT-RPM.
435
436
437
438APT-RPM                           14 Jun 2006                       APT-GET(8)
Impressum