You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
6.3 KiB

  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.moconnor;
  11. &apt-author.team;
  12. &apt-email;
  13. &apt-product;
  14. <!-- The last update date -->
  15. <date>2018-12-11T00:00:00Z</date>
  16. </refentryinfo>
  17. <refmeta>
  18. <refentrytitle>apt-mark</refentrytitle>
  19. <manvolnum>8</manvolnum>
  20. <refmiscinfo class="manual">APT</refmiscinfo>
  21. </refmeta>
  22. <!-- Man page title -->
  23. <refnamediv>
  24. <refname>apt-mark</refname>
  25. <refpurpose>show, set and unset various settings for a package</refpurpose>
  26. </refnamediv>
  27. &synopsis-command-apt-mark;
  28. <refsect1><title>Description</title>
  29. <para><command>apt-mark</command> can be used as a unified front-end to set
  30. various settings for a package, such as marking a package as being
  31. automatically/manually installed or changing <command>dpkg</command>
  32. selections such as hold, install, deinstall and purge which are respected
  33. e.g. by <command>apt-get dselect-upgrade</command> or <command>aptitude</command>.
  34. </para>
  35. </refsect1><refsect1><title>Automatically and Manually Installed Packages</title>
  36. <para>
  37. When you request that a package is installed, and as a result
  38. other packages are installed to satisfy its dependencies, the
  39. dependencies are marked as being automatically installed, while the
  40. package you installed explicitly is marked as manually installed.
  41. Once an automatically installed package is no longer depended on
  42. by any manually installed package it is considered no longer needed
  43. and e.g. <command>apt-get</command> or <command>aptitude</command>
  44. will at least suggest removing them.
  45. </para>
  46. <variablelist>
  47. <varlistentry><term><option>auto</option></term>
  48. <listitem><para><literal>auto</literal> is used to mark a
  49. package as being automatically installed, which will cause the
  50. package to be removed when no more manually installed packages
  51. depend on this package.
  52. </para></listitem>
  53. </varlistentry>
  54. <varlistentry><term><option>manual</option></term>
  55. <listitem><para><literal>manual</literal> is used to mark a
  56. package as being manually installed, which will prevent the
  57. package from being automatically removed if no other packages
  58. depend on it.
  59. </para></listitem>
  60. </varlistentry>
  61. <varlistentry><term><option>minimize-manual</option></term>
  62. <listitem><para><literal>minimize-manual</literal> is used to mark
  63. (transitive) dependencies of metapackages as automatically installed.
  64. This can be used after an installation for example, to minimize the
  65. number of manually installed packages; or continuously on systems
  66. managed by system configuration metapackages.
  67. </para></listitem>
  68. </varlistentry>
  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.
  74. </para></listitem>
  75. </varlistentry>
  76. <varlistentry><term><option>showmanual</option></term>
  77. <listitem><para><literal>showmanual</literal> can be used in
  78. the same way as <literal>showauto</literal> except that it will print
  79. a list of manually installed packages instead.
  80. </para></listitem>
  81. </varlistentry>
  82. </variablelist>
  83. <refsect2><title>Options</title>
  84. <variablelist>
  85. <varlistentry>
  86. <term><option>-f=&synopsis-param-filename;</option></term>
  87. <term><option>--file=&synopsis-param-filename;</option></term>
  88. <listitem><para>
  89. Read/Write package stats from the filename given with the parameter
  90. &synopsis-param-filename; instead of from the default location, which
  91. is <filename>extended_status</filename> in the directory defined
  92. by the Configuration Item: <literal>Dir::State</literal>.
  93. </para></listitem>
  94. </varlistentry>
  95. </variablelist>
  96. </refsect2>
  97. </refsect1><refsect1><title>Prevent Changes for a Package</title>
  98. <variablelist>
  99. <varlistentry><term><option>hold</option></term>
  100. <listitem><para><literal>hold</literal> is used to mark a
  101. package as held back, which will prevent the package from being
  102. automatically installed, upgraded or removed.
  103. </para></listitem>
  104. </varlistentry>
  105. <varlistentry><term><option>unhold</option></term>
  106. <listitem><para><literal>unhold</literal> is used to cancel a
  107. previously set hold on a package to allow all actions again.
  108. </para></listitem>
  109. </varlistentry>
  110. <varlistentry><term><option>showhold</option></term>
  111. <listitem><para><literal>showhold</literal> is used to print a list
  112. of packages on hold in the same way as for the other show commands.
  113. </para></listitem>
  114. </varlistentry>
  115. </variablelist>
  116. </refsect1><refsect1><title>Schedule Packages for Install, Remove and Purge</title>
  117. <para>
  118. Some front-ends like <command>apt-get dselect-upgrade</command> can be used to
  119. apply previously scheduled changes to the install state of packages. Such changes
  120. can be scheduled with the <option>install</option>, <option>remove</option>
  121. (also known as <option>deinstall</option>) and <option>purge</option> commands.
  122. Packages with a specific selection can be displayed with <option>showinstall</option>,
  123. <option>showremove</option> and <option>showpurge</option> respectively.
  124. More information about these so called dpkg selections can be found in &dpkg;.
  125. </para>
  126. </refsect1>
  127. <refsect1><title>Options</title>
  128. <variablelist>
  129. &apt-commonoptions;
  130. </variablelist>
  131. </refsect1>
  132. <refsect1><title>Files</title>
  133. <variablelist>
  134. &file-extended_states;
  135. </variablelist>
  136. </refsect1>
  137. <refsect1><title>See Also</title>
  138. <para><phrase>&apt-get;,&aptitude;,&apt-conf;</phrase></para>
  139. </refsect1>
  140. <refsect1><title>Diagnostics</title>
  141. <para><command>apt-mark</command> returns zero on normal operation, non-zero on error.</para>
  142. </refsect1>
  143. &manbugs;
  144. </refentry>