Index: head/en_US.ISO8859-1/books/handbook/ports/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/handbook/ports/chapter.xml
+++ head/en_US.ISO8859-1/books/handbook/ports/chapter.xml
@@ -627,12 +627,12 @@
- Automatically Removing Leaf Dependencies
+ Automatically Removing Unused Packages
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:
+ as dependencies (leaf packages) can be automatically detected
+ and removed using:
&prompt.root; pkg autoremove
Packages to be autoremoved:
@@ -642,6 +642,49 @@
Proceed with autoremoval of packages [y/N]: y
Deinstalling ca_root_nss-3.15.1_1... done
+
+ Packages installed as dependencies are
+ called automatic packages. Non-automatic
+ packages, i.e the packages that were explicity installed not
+ as a dependency to another package, can be listed
+ using:
+
+ &prompt.root; pkg prime-list
+nginx
+openvpn
+sudo
+
+ pkg prime-list is an alias command
+ declared in /usr/local/etc/pkg.conf.
+ There are many others that can be used to query the package
+ database of the system. For instance, command
+ pkg prime-origins can be used to get the
+ origin port directory of the list mentioned above:
+
+ &prompt.root; pkg prime-origins
+www/nginx
+security/openvpn
+security/sudo
+
+ This list can be used to rebuild all packages
+ installed on a system using build tools such as
+ ports-mgmt/poudriere or
+ ports-mgmt/synth.
+
+ Marking an installed package as automatic can be
+ done using:
+
+ &prompt.root; pkg set -A 1 devel/cmake
+
+ Once a package is a leaf package and is marked
+ as automatic, it gets selected by
+ pkg autoremove.
+
+ Marking an installed package as not
+ automatic can be done using:
+
+ &prompt.root; pkg set -A 0 devel/cmake
+