]> git.saurik.com Git - apt.git/blob - doc/apt.8.xml
support setting empty values (sanely) & removing support for
[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> provides a high-level commandline interface for
35 the package management system. It is intended as an end user interface and
36 enables some options better suited for interactive usage by default
37 compared to more specialized APT tools like &apt-get; and &apt-cache;.
38 </para><para>
39 Much like <command>apt</command> itself, its manpage is intended as an end
40 user interface and as such only mentions the most used commands and options
41 partly to not duplicate information in multiple places and partly to avoid
42 overwelming readers with a cornucopia of options and details.
43 </para>
44
45 <variablelist>
46 <varlistentry><term><option>update</option> (&apt-get;)</term>
47 <listitem><para><option>update</option> is used to download package
48 information from all configured sources. Other commands operate on
49 this data to e.g. perform package upgrades or search in and display
50 details about all packages available for installation.
51 </para></listitem>
52 </varlistentry>
53
54 <varlistentry><term><option>upgrade</option> (&apt-get;)</term>
55 <listitem><para><option>upgrade</option> is used to install available
56 upgrades of all packages currently installed on the system from the
57 sources configured via &sources-list;. New packages will be
58 installed if required to statisfy dependencies, but existing
59 packages will never be removed. If an upgrade for a package requires
60 the remove of an installed package the upgrade for this package
61 isn't performed.
62 </para></listitem>
63 </varlistentry>
64
65 <varlistentry><term><option>full-upgrade</option> (&apt-get;)</term>
66 <listitem><para><literal>full-upgrade</literal> performs the function of
67 upgrade but will remove currently installed packages if this is
68 needed to upgrade the system as a whole.
69 </para></listitem>
70 </varlistentry>
71
72 <varlistentry><term><option>install</option>, <option>remove</option>, <option>purge</option> (&apt-get;)</term>
73 <listitem><para>Performs the requested action on one or more packages
74 specified via &regex;, &glob; or exact match. The requested action
75 can be overidden for specific packages by append a plus (+) to the
76 package name to install this package or a minus (-) to remove it.
77 </para><para>
78 A specific version of a package can be selected for installation by
79 following the package name with an equals (=) and the version of the
80 package to select. Alternatively the version from a specific release can be
81 selected by following the package name with a forward slash (/) and
82 codename (&stable-codename;, &testing-codename;, sid …) or suite name (stable,
83 testing, unstable). This will also select versions from this release
84 for dependencies of this package if needed to satisfy the request.
85 </para><para>
86 Removing a package removes all packaged data, but leaves usually
87 small (modified) user configuration files behind, in case the
88 remove was an accident. Just issuing an installtion request for the
89 accidently removed package will restore it funcation as before in
90 that case. On the other hand you can get right of these leftovers
91 via calling <command>purge</command> even on already removed
92 packages. Note that this does not effect any data or configuration
93 stored in your home directory.
94 </para></listitem>
95 </varlistentry>
96
97 <varlistentry><term><option>autoremove</option> (&apt-get;)</term>
98 <listitem><para>
99 <literal>autoremove</literal> is used to remove packages that were
100 automatically installed to satisfy dependencies for other packages
101 and are now no longer needed as dependencies changed or the package(s)
102 needing them were removed in the meantime.
103 </para><para>
104 Try to ensure that the list does not include applications you have
105 grown to like even through they there once installed just as a
106 dependency of another package. You can mark such a package as manually
107 installed by using &apt-mark;. Packages which you have installed explicitly
108 via <command>install</command> are never proposed for automatic removal as well.
109 </para></listitem>
110 </varlistentry>
111
112 <varlistentry><term><option>search</option> (&apt-cache;)</term>
113 <listitem><para><option>search</option> can be used to search for the given
114 &regex; term(s) in the list of the available packages and display
115 matches. This can e.g. be useful if you are looking for packages
116 having a specific feature. If you are looking for a package
117 including a specific file try &apt-file;.
118 </para></listitem>
119 </varlistentry>
120
121 <varlistentry><term><option>show</option> (&apt-cache;)</term>
122 <listitem><para>Show information about the given package(s) including
123 its dependencies, installation and download size, sources the
124 package is available from, the description of the packages content
125 and many more. It can e.g. be helpful to look at this information
126 before allowing &apt; to remove a package or while searching for
127 new packages to install.
128 </para></listitem>
129 </varlistentry>
130
131 <varlistentry><term><option>list</option> (work-in-progress)</term>
132 <listitem><para><option>list</option> is somewhat similar to <command>dpkg-query --list</command>
133 in that it can display a list of packages satisfying certain
134 criteria. It supports &glob; patterns for matching package names as
135 well as options to list installed (<option>--installed</option>),
136 upgradeable (<option>--upgradeable</option>) or all available
137 (<option>--all-versions</option>) versions.
138 </para></listitem>
139 </varlistentry>
140
141 <varlistentry><term><option>edit-sources</option> (work-in-progress)</term>
142 <listitem><para><literal>edit-sources</literal> lets you edit
143 your &sources-list; files in your preferred texteditor while also
144 providing basic sanity checks.
145 </para></listitem>
146 </varlistentry>
147
148
149 </variablelist>
150 </refsect1>
151
152 <refsect1><title>Script usage and Differences to other APT tools</title>
153 <para>
154 The &apt; commandline is designed as a end-user tool and it may
155 change behaviour between versions. While it tries to not break
156 backward compatibility there is no guarantee for it either if it
157 seems benefitial for interactive use.
158 </para><para>
159 All features of &apt; are available in dedicated APT tools like &apt-get;
160 and &apt-cache; as well. &apt; just changes the default value of some
161 options (see &apt-conf; and specifically the Binary scope). So prefer using
162 these commands (potentially with some additional options enabled) in your
163 scripts as they keep backward compatibility as much as possible.
164 </para>
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>