From owner-svn-doc-head@freebsd.org Fri Dec 21 18:16:07 2018 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B39A1352DEC; Fri, 21 Dec 2018 18:16:07 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0E3676759; Fri, 21 Dec 2018 18:16:06 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2A59191C7; Fri, 21 Dec 2018 18:16:06 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBLIG6Ln039417; Fri, 21 Dec 2018 18:16:06 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBLIG66A039416; Fri, 21 Dec 2018 18:16:06 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201812211816.wBLIG66A039416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Fri, 21 Dec 2018 18:16:06 +0000 (UTC) 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 X-SVN-Group: doc-head X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/handbook/ports X-SVN-Commit-Revision: 52705 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E0E3676759 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2018 18:16:07 -0000 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]: y - 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 @@ The autoremoval will free 723 kB 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 +