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