Date: Fri, 21 Dec 2018 18:16:06 +0000 (UTC) From: Benedict Reuschling <bcr@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r52705 - head/en_US.ISO8859-1/books/handbook/ports Message-ID: <201812211816.wBLIG66A039416@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bcr Date: Fri Dec 21 18:16:06 2018 New Revision: 52705 URL: https://svnweb.freebsd.org/changeset/doc/52705 Log: 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@fzwte.net Reviewed by: ygy@, myself Approved by: ygy Differential Revision: https://reviews.freebsd.org/D18497 Modified: head/en_US.ISO8859-1/books/handbook/ports/chapter.xml 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> <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> +nginx +openvpn +sudo</screen> + + <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> +www/nginx +security/openvpn +security/sudo</screen> + + <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> <sect2 xml:id="pkgng-backup">
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812211816.wBLIG66A039416>