apt.8.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
  5. <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
  6. <!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
  7. ]>
  8. <refentry>
  9. <refentryinfo>
  10. &apt-author.team;
  11. &apt-email;
  12. &apt-product;
  13. <!-- The last update date -->
  14. <date>2015-10-20T00:00:00Z</date>
  15. </refentryinfo>
  16. <refmeta>
  17. <refentrytitle>apt</refentrytitle>
  18. <manvolnum>8</manvolnum>
  19. <refmiscinfo class="manual">APT</refmiscinfo>
  20. </refmeta>
  21. <!-- Man page title -->
  22. <refnamediv>
  23. <refname>apt</refname>
  24. <refpurpose>command-line interface</refpurpose>
  25. </refnamediv>
  26. &synopsis-command-apt;
  27. <refsect1><title>Description</title>
  28. <para><command>apt</command> provides a high-level commandline interface for
  29. the package management system. It is intended as an end user interface and
  30. enables some options better suited for interactive usage by default
  31. compared to more specialized APT tools like &apt-get; and &apt-cache;.
  32. </para><para>
  33. Much like <command>apt</command> itself, its manpage is intended as an end
  34. user interface and as such only mentions the most used commands and options
  35. partly to not duplicate information in multiple places and partly to avoid
  36. overwhelming readers with a cornucopia of options and details.
  37. </para>
  38. <variablelist>
  39. <varlistentry><term><option>update</option> (&apt-get;)</term>
  40. <listitem><para><option>update</option> is used to download package
  41. information from all configured sources. Other commands operate on
  42. this data to e.g. perform package upgrades or search in and display
  43. details about all packages available for installation.
  44. </para></listitem>
  45. </varlistentry>
  46. <varlistentry><term><option>upgrade</option> (&apt-get;)</term>
  47. <listitem><para><option>upgrade</option> is used to install available
  48. upgrades of all packages currently installed on the system from the
  49. sources configured via &sources-list;. New packages will be
  50. installed if required to satisfy dependencies, but existing
  51. packages will never be removed. If an upgrade for a package requires
  52. the remove of an installed package the upgrade for this package
  53. isn't performed.
  54. </para></listitem>
  55. </varlistentry>
  56. <varlistentry><term><option>full-upgrade</option> (&apt-get;)</term>
  57. <listitem><para><literal>full-upgrade</literal> performs the function of
  58. upgrade but will remove currently installed packages if this is
  59. needed to upgrade the system as a whole.
  60. </para></listitem>
  61. </varlistentry>
  62. <varlistentry><term><option>install</option>, <option>remove</option>, <option>purge</option> (&apt-get;)</term>
  63. <listitem><para>Performs the requested action on one or more packages
  64. specified via &regex;, &glob; or exact match. The requested action
  65. can be overridden for specific packages by append a plus (+) to the
  66. package name to install this package or a minus (-) to remove it.
  67. </para><para>
  68. A specific version of a package can be selected for installation by
  69. following the package name with an equals (=) and the version of the
  70. package to select. Alternatively the version from a specific release can be
  71. selected by following the package name with a forward slash (/) and
  72. codename (&debian-stable-codename;, &debian-testing-codename;, sid …) or suite name (stable,
  73. testing, unstable). This will also select versions from this release
  74. for dependencies of this package if needed to satisfy the request.
  75. </para><para>
  76. Removing a package removes all packaged data, but leaves usually
  77. small (modified) user configuration files behind, in case the
  78. remove was an accident. Just issuing an installation request for the
  79. accidentally removed package will restore its function as before in
  80. that case. On the other hand you can get rid of these leftovers
  81. by calling <command>purge</command> even on already removed
  82. packages. Note that this does not affect any data or configuration
  83. stored in your home directory.
  84. </para></listitem>
  85. </varlistentry>
  86. <varlistentry><term><option>autoremove</option> (&apt-get;)</term>
  87. <listitem><para>
  88. <literal>autoremove</literal> is used to remove packages that were
  89. automatically installed to satisfy dependencies for other packages
  90. and are now no longer needed as dependencies changed or the package(s)
  91. needing them were removed in the meantime.
  92. </para><para>
  93. You should check that the list does not include applications you have
  94. grown to like even though they were once installed just as a
  95. dependency of another package. You can mark such a package as manually
  96. installed by using &apt-mark;. Packages which you have installed explicitly
  97. via <command>install</command> are also never proposed for automatic removal.
  98. </para></listitem>
  99. </varlistentry>
  100. <varlistentry><term><option>search</option> (&apt-cache;)</term>
  101. <listitem><para><option>search</option> can be used to search for the given
  102. &regex; term(s) in the list of available packages and display
  103. matches. This can e.g. be useful if you are looking for packages
  104. having a specific feature. If you are looking for a package
  105. including a specific file try &apt-file;.
  106. </para></listitem>
  107. </varlistentry>
  108. <varlistentry><term><option>show</option> (&apt-cache;)</term>
  109. <listitem><para>Show information about the given package(s) including
  110. its dependencies, installation and download size, sources the
  111. package is available from, the description of the packages content
  112. and much more. It can e.g. be helpful to look at this information
  113. before allowing &apt; to remove a package or while searching for
  114. new packages to install.
  115. </para></listitem>
  116. </varlistentry>
  117. <varlistentry><term><option>list</option> (work-in-progress)</term>
  118. <listitem><para><option>list</option> is somewhat similar to <command>dpkg-query --list</command>
  119. in that it can display a list of packages satisfying certain
  120. criteria. It supports &glob; patterns for matching package names as
  121. well as options to list installed (<option>--installed</option>),
  122. upgradeable (<option>--upgradeable</option>) or all available
  123. (<option>--all-versions</option>) versions.
  124. </para></listitem>
  125. </varlistentry>
  126. <varlistentry><term><option>edit-sources</option> (work-in-progress)</term>
  127. <listitem><para><literal>edit-sources</literal> lets you edit
  128. your &sources-list; files in your preferred texteditor while also
  129. providing basic sanity checks.
  130. </para></listitem>
  131. </varlistentry>
  132. </variablelist>
  133. </refsect1>
  134. <refsect1><title>Script Usage and Differences from Other APT Tools</title>
  135. <para>
  136. The &apt; commandline is designed as an end-user tool and it may
  137. change behavior between versions. While it tries not to break
  138. backward compatibility this is not guaranteed either if a change
  139. seems beneficial for interactive use.
  140. </para><para>
  141. All features of &apt; are available in dedicated APT tools like &apt-get;
  142. and &apt-cache; as well. &apt; just changes the default value of some
  143. options (see &apt-conf; and specifically the Binary scope). So you should
  144. prefer using these commands (potentially with some additional options
  145. enabled) in your scripts as they keep backward compatibility as much as possible.
  146. </para>
  147. </refsect1>
  148. <refsect1><title>See Also</title>
  149. <para>&apt-get;, &apt-cache;, &sources-list;,
  150. &apt-conf;, &apt-config;,
  151. The APT User's guide in &guidesdir;, &apt-preferences;, the APT Howto.</para>
  152. </refsect1>
  153. <refsect1><title>Diagnostics</title>
  154. <para><command>apt</command> returns zero on normal operation, decimal 100 on error.</para>
  155. </refsect1>
  156. &manbugs;
  157. </refentry>