apt-get.8.yo 12 KB

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