svn commit: r52705 - head/en_US.ISO8859-1/books/handbook/ports

Benedict Reuschling bcr at
Fri Dec 21 18:16:07 UTC 2018

Author: bcr
Date: Fri Dec 21 18:16:06 2018
New Revision: 52705

  Improve the handbook section about leaf/automatic packages.
  The patch includes instructions on how to list the prime (non-automatic)
  packages, and how to mark a package as automatic or non-automatic.
  PR:			233894
  Submitted by:		public at
  Reviewed by:		ygy@, myself
  Approved by:		ygy
  Differential Revision:


Modified: head/en_US.ISO8859-1/books/handbook/ports/chapter.xml
--- head/en_US.ISO8859-1/books/handbook/ports/chapter.xml	Thu Dec 20 21:54:05 2018	(r52704)
+++ head/en_US.ISO8859-1/books/handbook/ports/chapter.xml	Fri Dec 21 18:16:06 2018	(r52705)
@@ -627,12 +627,12 @@ Proceed with deleting packages [y/N]: <userinput>y</us
     <sect2 xml:id="pkgng-autoremove">
-      <title>Automatically Removing Leaf Dependencies</title>
+      <title>Automatically Removing Unused Packages</title>
       <para>Removing a package may leave behind dependencies which
 	are no longer required.  Unneeded packages that were installed
-	as dependencies can be automatically detected and removed
-	using:</para>
+	as dependencies (leaf packages) can be automatically detected
+	and removed using:</para>
       <screen>&prompt.root; <userinput>pkg autoremove</userinput>
 Packages to be autoremoved:
@@ -642,6 +642,49 @@ The autoremoval will free 723 kB
 Proceed with autoremoval of packages [y/N]: <userinput>y</userinput>
 Deinstalling ca_root_nss-3.15.1_1... done</screen>
+      <para>Packages installed as dependencies are
+	called <emphasis>automatic</emphasis> packages.  Non-automatic
+	packages, i.e the packages that were explicity installed not
+	as a dependency to another package, can be listed
+	using:</para>
+      <screen>&prompt.root; <userinput>pkg prime-list</userinput>
+      <para><command>pkg prime-list</command> is an alias command
+	declared in <filename>/usr/local/etc/pkg.conf</filename>.
+	There are many others that can be used to query the package
+	database of the system.  For instance, command
+	<command>pkg prime-origins</command> can be used to get the
+	origin port directory of the list mentioned above:</para>
+      <screen>&prompt.root; <userinput>pkg prime-origins</userinput>
+      <para>This list can be used to rebuild all packages
+	installed on a system using build tools such as <package>
+	ports-mgmt/poudriere</package> or <package>
+	ports-mgmt/synth</package>.</para>
+    <para>Marking an installed package as automatic can be
+      done using:</para>
+      <screen>&prompt.root; <userinput>pkg set -A 1 devel/cmake</userinput></screen>
+      <para>Once a package is a leaf package and is marked
+	as automatic, it gets selected by
+	<command>pkg autoremove</command>.</para>
+      <para>Marking an installed package as <emphasis>not</emphasis>
+	automatic can be done using:</para>
+      <screen>&prompt.root; <userinput>pkg set -A 0 devel/cmake</userinput></screen>
     <sect2 xml:id="pkgng-backup">

More information about the svn-doc-all mailing list