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