apt-mark.8.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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>2015-09-25T00: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>showauto</option></term>
  62. <listitem><para><literal>showauto</literal> is used to print a
  63. list of automatically installed packages with each package on a new line.
  64. All automatically installed packages will be listed if no package is given.
  65. If packages are given only those which are automatically installed will be shown.
  66. </para></listitem>
  67. </varlistentry>
  68. <varlistentry><term><option>showmanual</option></term>
  69. <listitem><para><literal>showmanual</literal> can be used in
  70. the same way as <literal>showauto</literal> except that it will print
  71. a list of manually installed packages instead.
  72. </para></listitem>
  73. </varlistentry>
  74. </variablelist>
  75. <refsect2><title>Options</title>
  76. <variablelist>
  77. <varlistentry>
  78. <term><option>-f=&synopsis-param-filename;</option></term>
  79. <term><option>--file=&synopsis-param-filename;</option></term>
  80. <listitem><para>
  81. Read/Write package stats from the filename given with the parameter
  82. &synopsis-param-filename; instead of from the default location, which
  83. is <filename>extended_status</filename> in the directory defined
  84. by the Configuration Item: <literal>Dir::State</literal>.
  85. </para></listitem>
  86. </varlistentry>
  87. </variablelist>
  88. </refsect2>
  89. </refsect1><refsect1><title>Prevent Changes for a Package</title>
  90. <variablelist>
  91. <varlistentry><term><option>hold</option></term>
  92. <listitem><para><literal>hold</literal> is used to mark a
  93. package as held back, which will prevent the package from being
  94. automatically installed, upgraded or removed.
  95. </para></listitem>
  96. </varlistentry>
  97. <varlistentry><term><option>unhold</option></term>
  98. <listitem><para><literal>unhold</literal> is used to cancel a
  99. previously set hold on a package to allow all actions again.
  100. </para></listitem>
  101. </varlistentry>
  102. <varlistentry><term><option>showhold</option></term>
  103. <listitem><para><literal>showhold</literal> is used to print a list
  104. of packages on hold in the same way as for the other show commands.
  105. </para></listitem>
  106. </varlistentry>
  107. </variablelist>
  108. </refsect1><refsect1><title>Schedule Packages for Install, Remove and Purge</title>
  109. <para>
  110. Some front-ends like <command>apt-get dselect-upgrade</command> can be used to
  111. apply previously scheduled changes to the install state of packages. Such changes
  112. can be scheduled with the <option>install</option>, <option>remove</option>
  113. (also known as <option>deinstall</option>) and <option>purge</option> commands.
  114. Packages with a specific selection can be displayed with <option>showinstall</option>,
  115. <option>showremove</option> and <option>showpurge</option> respectively.
  116. More information about these so called dpkg selections can be found in &dpkg;.
  117. </para>
  118. </refsect1>
  119. <refsect1><title>Options</title>
  120. <variablelist>
  121. &apt-commonoptions;
  122. </variablelist>
  123. </refsect1>
  124. <refsect1><title>Files</title>
  125. <variablelist>
  126. &file-extended_states;
  127. </variablelist>
  128. </refsect1>
  129. <refsect1><title>See Also</title>
  130. <para><phrase>&apt-get;,&aptitude;,&apt-conf;</phrase></para>
  131. </refsect1>
  132. <refsect1><title>Diagnostics</title>
  133. <para><command>apt-mark</command> returns zero on normal operation, non-zero on error.</para>
  134. </refsect1>
  135. &manbugs;
  136. </refentry>