apt.8.xml 6.0 KB

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