apt.8.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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>2013-11-25T00: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> (Advanced Package Tool) is the
  29. command-line tool for handling packages. It provides a commandline
  30. interface for the package management of the system.
  31. See also &apt-get; and &apt-cache; for more low-level command options.
  32. </para>
  33. <variablelist>
  34. <varlistentry><term><option>list</option></term>
  35. <listitem><para><literal>list</literal> is used to
  36. display a list of packages. It supports shell pattern for matching
  37. package names and the following options:
  38. <option>--installed</option>,
  39. <option>--upgradable</option>,
  40. <option>--upgradeable</option>,
  41. <option>--all-versions</option>
  42. are supported.
  43. </para></listitem>
  44. </varlistentry>
  45. <varlistentry><term><option>search</option></term>
  46. <listitem><para><literal>search</literal> searches for the given
  47. term(s) and display matching packages.
  48. </para></listitem>
  49. </varlistentry>
  50. <varlistentry><term><option>show</option></term>
  51. <listitem><para><literal>show</literal> shows the package information
  52. for the given package(s).
  53. </para></listitem>
  54. </varlistentry>
  55. <varlistentry><term><option>install</option></term>
  56. <listitem>
  57. <para><literal>install</literal> is followed by one or more
  58. package names desired for installation or upgrading.
  59. </para>
  60. <para>A specific version of a package can be selected for installation by
  61. following the package name with an equals and the version of the package
  62. to select. This will cause that version to be located and selected for
  63. install. Alternatively a specific distribution can be selected by
  64. following the package name with a slash and the version of the
  65. distribution or the Archive name (stable, testing, unstable).</para>
  66. </listitem>
  67. </varlistentry>
  68. <varlistentry><term><option>remove</option></term>
  69. <listitem><para><literal>remove</literal> is identical to <literal>install</literal> except that packages are
  70. removed instead of installed. Note that removing a package leaves its
  71. configuration files on the system. If a plus sign is appended to the package
  72. name (with no intervening space), the identified package will be
  73. installed instead of removed.</para></listitem>
  74. </varlistentry>
  75. <varlistentry><term><option>edit-sources</option></term>
  76. <listitem><para><literal>edit-sources</literal> lets you edit
  77. your sources.list file and provides basic sanity checks.
  78. </para></listitem>
  79. </varlistentry>
  80. <varlistentry><term><option>update</option></term>
  81. <listitem><para><literal>update</literal> is used to
  82. resynchronize the package index files from their sources.
  83. </para></listitem>
  84. </varlistentry>
  85. <varlistentry><term><option>upgrade</option></term>
  86. <listitem><para><literal>upgrade</literal> is used to install the
  87. newest versions of all packages currently installed on the system
  88. from the sources enumerated in
  89. <filename>/etc/apt/sources.list</filename>. New packages will be
  90. installed, but existing packages will never be removed.
  91. </para></listitem>
  92. </varlistentry>
  93. <varlistentry><term><option>full-upgrade</option></term>
  94. <listitem><para><literal>full-upgrade</literal> performs the
  95. function of upgrade but may also remove installed packages
  96. if that is required in order to resolve a package conflict.
  97. </para></listitem>
  98. </varlistentry>
  99. </variablelist>
  100. </refsect1>
  101. <refsect1><title>options</title>
  102. &apt-cmdblurb;
  103. <variablelist>
  104. &apt-commonoptions;
  105. </variablelist>
  106. </refsect1>
  107. <refsect1><title>Script usage</title>
  108. <para>
  109. The &apt; commandline is designed as a end-user tool and it may
  110. change the output between versions. While it tries to not break
  111. backward compatibility there is no guarantee for it either.
  112. All features of &apt; are available in &apt-cache; and &apt-get;
  113. via APT options. Please prefer using these commands in your scripts.
  114. </para>
  115. </refsect1>
  116. <refsect1><title>Differences to &apt-get;</title>
  117. <para>The <command>apt</command> command is meant to be pleasant for
  118. end users and does not need to be backward compatible like
  119. &apt-get;. Therefore some options are different:
  120. <itemizedlist>
  121. <listitem>
  122. <para>The option <literal>DPkg::Progress-Fancy</literal> is enabled.
  123. </para>
  124. </listitem>
  125. <listitem>
  126. <para>The option <literal>APT::Color</literal> is enabled.
  127. </para>
  128. </listitem>
  129. <listitem>
  130. <para>A new <literal>list</literal> command is available
  131. similar to <literal>dpkg --list</literal>.
  132. </para>
  133. </listitem>
  134. <listitem>
  135. <para>The option <literal>upgrade</literal> has
  136. <literal>--with-new-pkgs</literal> enabled by default.
  137. </para>
  138. </listitem>
  139. </itemizedlist>
  140. </para>
  141. </refsect1>
  142. <refsect1><title>See Also</title>
  143. <para>&apt-get;, &apt-cache;, &sources-list;,
  144. &apt-conf;, &apt-config;,
  145. The APT User's guide in &guidesdir;, &apt-preferences;, the APT Howto.</para>
  146. </refsect1>
  147. <refsect1><title>Diagnostics</title>
  148. <para><command>apt</command> returns zero on normal operation, decimal 100 on error.</para>
  149. </refsect1>
  150. &manbugs;
  151. </refentry>