You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

187 lines
8.3 KiB

  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>2020-04-05T00: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 removal 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>reinstall</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 appending 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>satisfy</option> (&apt-get;)</term>
  101. <listitem><para><option>satisfy</option> satisfies dependency strings, as
  102. used in Build-Depends. It also handles conflicts, by prefixing an argument
  103. with <literal>"Conflicts: "</literal>.
  104. </para><para>Example: <literal>apt satisfy "foo, bar (>= 1.0)" "Conflicts: baz, fuzz"</literal>
  105. </para></listitem>
  106. </varlistentry>
  107. <varlistentry><term><option>search</option> (&apt-cache;)</term>
  108. <listitem><para><option>search</option> can be used to search for the given
  109. &regex; term(s) in the list of available packages and display
  110. matches. This can e.g. be useful if you are looking for packages
  111. having a specific feature. If you are looking for a package
  112. including a specific file try &apt-file;.
  113. </para></listitem>
  114. </varlistentry>
  115. <varlistentry><term><option>show</option> (&apt-cache;)</term>
  116. <listitem><para>Show information about the given package(s) including
  117. its dependencies, installation and download size, sources the
  118. package is available from, the description of the packages content
  119. and much more. It can e.g. be helpful to look at this information
  120. before allowing &apt; to remove a package or while searching for
  121. new packages to install.
  122. </para></listitem>
  123. </varlistentry>
  124. <varlistentry><term><option>list</option></term>
  125. <listitem><para><option>list</option> is somewhat similar to <command>dpkg-query --list</command>
  126. in that it can display a list of packages satisfying certain
  127. criteria. It supports &glob; patterns for matching package names as
  128. well as options to list installed (<option>--installed</option>),
  129. upgradeable (<option>--upgradeable</option>) or all available
  130. (<option>--all-versions</option>) versions.
  131. </para></listitem>
  132. </varlistentry>
  133. <varlistentry><term><option>edit-sources</option> (work-in-progress)</term>
  134. <listitem><para><literal>edit-sources</literal> lets you edit
  135. your &sources-list; files in your preferred text editor while also
  136. providing basic sanity checks.
  137. </para></listitem>
  138. </varlistentry>
  139. </variablelist>
  140. </refsect1>
  141. <refsect1><title>Script Usage and Differences from Other APT Tools</title>
  142. <para>
  143. The &apt; commandline is designed as an end-user tool and it may
  144. change behavior between versions. While it tries not to break
  145. backward compatibility this is not guaranteed either if a change
  146. seems beneficial for interactive use.
  147. </para><para>
  148. All features of &apt; are available in dedicated APT tools like &apt-get;
  149. and &apt-cache; as well. &apt; just changes the default value of some
  150. options (see &apt-conf; and specifically the Binary scope). So you should
  151. prefer using these commands (potentially with some additional options
  152. enabled) in your scripts as they keep backward compatibility as much as possible.
  153. </para>
  154. </refsect1>
  155. <refsect1><title>See Also</title>
  156. <para>&apt-get;, &apt-cache;, &sources-list;,
  157. &apt-conf;, &apt-config;,
  158. The APT User's guide in &guidesdir;, &apt-preferences;, the APT Howto.</para>
  159. </refsect1>
  160. <refsect1><title>Diagnostics</title>
  161. <para><command>apt</command> returns zero on normal operation, decimal 100 on error.</para>
  162. </refsect1>
  163. &manbugs;
  164. </refentry>