Changeset View
Changeset View
Standalone View
Standalone View
head/en_US.ISO8859-1/books/handbook/ports/chapter.xml
Show First 20 Lines • Show All 621 Lines • ▼ Show 20 Lines | [1/1] Deleting curl-7.31.0_1... done</screen> | ||||
mechanism. To determine if there are any known | mechanism. To determine if there are any known | ||||
vulnerabilities for the software installed on the system, | vulnerabilities for the software installed on the system, | ||||
run:</para> | run:</para> | ||||
<screen>&prompt.root; <userinput>pkg audit -F</userinput></screen> | <screen>&prompt.root; <userinput>pkg audit -F</userinput></screen> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="pkgng-autoremove"> | <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 | <para>Removing a package may leave behind dependencies which | ||||
are no longer required. Unneeded packages that were installed | are no longer required. Unneeded packages that were installed | ||||
as dependencies can be automatically detected and removed | as dependencies (leaf packages) can be automatically detected | ||||
using:</para> | and removed using:</para> | ||||
<screen>&prompt.root; <userinput>pkg autoremove</userinput> | <screen>&prompt.root; <userinput>pkg autoremove</userinput> | ||||
Packages to be autoremoved: | Packages to be autoremoved: | ||||
ca_root_nss-3.15.1_1 | ca_root_nss-3.15.1_1 | ||||
The autoremoval will free 723 kB | The autoremoval will free 723 kB | ||||
Proceed with autoremoval of packages [y/N]: <userinput>y</userinput> | Proceed with autoremoval of packages [y/N]: <userinput>y</userinput> | ||||
Deinstalling ca_root_nss-3.15.1_1... done</screen> | 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> | ||||
<sect2 xml:id="pkgng-backup"> | <sect2 xml:id="pkgng-backup"> | ||||
<title>Restoring the Package Database</title> | <title>Restoring the Package Database</title> | ||||
<para>Unlike the traditional package management system, | <para>Unlike the traditional package management system, | ||||
<application>pkg</application> includes its own package | <application>pkg</application> includes its own package | ||||
database backup mechanism. This functionality is enabled by | database backup mechanism. This functionality is enabled by | ||||
▲ Show 20 Lines • Show All 1,088 Lines • Show Last 20 Lines |