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;
16 <!-- The last update date -->
17 <date>2015-
09-
25T00:
00:
00Z
</date>
21 <refentrytitle>apt-mark
</refentrytitle>
22 <manvolnum>8</manvolnum>
23 <refmiscinfo class=
"manual">APT
</refmiscinfo>
26 <!-- Man page title -->
28 <refname>apt-mark
</refname>
29 <refpurpose>show, set and unset various settings for a package
</refpurpose>
32 &synopsis-command-apt-mark;
34 <refsect1><title>Description
</title>
35 <para><command>apt-mark
</command> can be used as a unified front-end to set
36 various settings for a package, such as marking a package as being
37 automatically/manually installed or changing
<command>dpkg
</command>
38 selections such as hold, install, deinstall and purge which are respected
39 e.g. by
<command>apt-get dselect-upgrade
</command> or
<command>aptitude
</command>.
41 </refsect1><refsect1><title>Automatically and Manually Installed Packages
</title>
43 When you request that a package is installed, and as a result
44 other packages are installed to satisfy its dependencies, the
45 dependencies are marked as being automatically installed, while the
46 package you installed explicitly is marked as manually installed.
47 Once an automatically installed package is no longer depended on
48 by any manually installed package it is considered no longer needed
49 and e.g.
<command>apt-get
</command> or
<command>aptitude
</command>
50 will at least suggest removing them.
53 <varlistentry><term><option>auto
</option></term>
54 <listitem><para><literal>auto
</literal> is used to mark a
55 package as being automatically installed, which will cause the
56 package to be removed when no more manually installed packages
57 depend on this package.
61 <varlistentry><term><option>manual
</option></term>
62 <listitem><para><literal>manual
</literal> is used to mark a
63 package as being manually installed, which will prevent the
64 package from being automatically removed if no other packages
69 <varlistentry><term><option>showauto
</option></term>
70 <listitem><para><literal>showauto
</literal> is used to print a
71 list of automatically installed packages with each package on a new line.
72 All automatically installed packages will be listed if no package is given.
73 If packages are given only those which are automatically installed will be shown.
77 <varlistentry><term><option>showmanual
</option></term>
78 <listitem><para><literal>showmanual
</literal> can be used in
79 the same way as
<literal>showauto
</literal> except that it will print
80 a list of manually installed packages instead.
85 <refsect2><title>Options
</title>
88 <term><option>-f=&synopsis-param-filename;
</option></term>
89 <term><option>--file=&synopsis-param-filename;
</option></term>
91 Read/Write package stats from the filename given with the parameter
92 &synopsis-param-filename; instead of from the default location, which
93 is
<filename>extended_status
</filename> in the directory defined
94 by the Configuration Item:
<literal>Dir::State
</literal>.
100 </refsect1><refsect1><title>Prevent Changes for a Package
</title>
102 <varlistentry><term><option>hold
</option></term>
103 <listitem><para><literal>hold
</literal> is used to mark a
104 package as held back, which will prevent the package from being
105 automatically installed, upgraded or removed.
109 <varlistentry><term><option>unhold
</option></term>
110 <listitem><para><literal>unhold
</literal> is used to cancel a
111 previously set hold on a package to allow all actions again.
115 <varlistentry><term><option>showhold
</option></term>
116 <listitem><para><literal>showhold
</literal> is used to print a list
117 of packages on hold in the same way as for the other show commands.
121 </refsect1><refsect1><title>Schedule Packages for Install, Remove and Purge
</title>
123 Some front-ends like
<command>apt-get dselect-upgrade
</command> can be used to
124 apply previously scheduled changes to the install state of packages. Such changes
125 can be scheduled with the
<option>install
</option>,
<option>remove
</option>
126 (also known as
<option>deinstall
</option>) and
<option>purge
</option> commands.
127 Packages with a specific selection can be displayed with
<option>showinstall
</option>,
128 <option>showremove
</option> and
<option>showpurge
</option> respectively.
129 More information about these so called dpkg selections can be found in
&dpkg;.
133 <refsect1><title>Options
</title>
139 <refsect1><title>Files
</title>
141 &file-extended_states;
145 <refsect1><title>See Also
</title>
146 <para><phrase>&apt-get;,
&aptitude;,&apt-conf;
</phrase></para>
149 <refsect1><title>Diagnostics
</title>
150 <para><command>apt-mark
</command> returns zero on normal operation, non-zero on error.
</para>