docs/187351: handbook section on ports does not mention pkg search

Allan Jude freebsd at
Fri Mar 7 15:50:01 UTC 2014

>Number:         187351
>Category:       docs
>Synopsis:       handbook section on ports does not mention pkg search
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 07 15:50:00 UTC 2014
>Originator:     Allan Jude
>Release:        9.2-RELEASE
ScaleEngine Inc.
FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root at  amd64

The handbook section "5.3. Finding Software" does not mention 'pkg search' as a way to find software. Even for searching the ports tree, this can be useful, but it is especially useful when searching for a package

Patch attached

Patch attached with submission follows:

Index: ports/chapter.xml
--- ports/chapter.xml	(revision 44112)
+++ ports/chapter.xml	(working copy)
@@ -197,9 +197,11 @@
       <para>Before installing any application, check <uri
 	for security issues related to the application or install
-	<package>ports-mgmt/portaudit</package>. Once installed, type
+	<package>ports-mgmt/portaudit</package>.  Once installed, type
 	<command>portaudit -F -a</command> to check all installed
-	applications for known vulnerabilities.</para>
+	applications for known vulnerabilities.  If you are using
+	<application>pkg</application>, the audit functionality is
+	built in, simply run: <command>pkg audit -F</command>.</para>
     <para>The remainder of this chapter explains how to use packages
@@ -246,6 +248,61 @@
+	<indexterm>
+	  <primary>pkg</primary>
+	  <secondary>search</secondary>
+	</indexterm>
+	<para xml:id="pkg-search">To search the binary package
+	  repository for an application:</para>
+	<screen>&prompt.root; <userinput>pkg search <replaceable>subversion</replaceable></userinput>
+	<para>Package names include the version number and in the
+	  case of ports based on python, the version number of the
+	  version of python the package was built with.  Some ports
+	  also have multiple versions available.  In the case of
+	  <application>subversion</application> there are different
+	  versions available, as well as different compile options,
+	  in this case, the staticly linked version of
+	  <application>subversion</application>.  When indicating
+	  which package to install, it is best to specify the
+	  application by the port origin, the path in the ports tree.
+	  Repeat the <command>pkg search</command> with
+	  <option>-o</option> to list the origin of each
+	  package:</para>
+	<screen>&prompt.root; <userinput>pkg search -o <replaceable>subversion</replaceable></userinput>
+	<para><command>pkg search</command> also supports searching
+	  using shell globs, regular expressions, exact match,
+	  search by description, or any other field in the
+	  repository database.  See &man.pkg-search.8;</para>
+      </listitem>
+      <listitem>
 	<para>If the Ports Collection is already installed, there are
 	  several methods to query the local version of the ports
 	  tree.  To find out which category a port is in, type


More information about the freebsd-doc mailing list