Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
PORTSDB(1)              FreeBSD General Commands Manual             PORTSDB(1)

     portsdb, ports_glob - tools to manage and look up the ports database file

     portsdb [-hfFquU]
     ports_glob [-hMrR] [-x pkgname_glob | portorigin_glob]
                [pkgname_glob | portorigin_glob] ...

     The portsdb command is a tool to generates the ports database named
     INDEX.db from the ports index file named INDEX.  It is commonly used
     among the tool suite and automatically updated on demand when it gets
     older than the index file.  To save time, you can update it beforehand,
     like right after the index file is updated.  Note that INDEX file is
     updated every few hours on official site, it is recommended that you run
     ``portsdb -Fu'' after every CVSup of the ports tree in order to keep them
     always up-to-date and in sync with the ports tree.

     ports_glob looks up the ports database to expand given patterns.

     Actually, portsdb and ports_glob share an entity and are totally

     Before reading these instructions, you must understand that a
     port/package can have the following two types of related ports/packages:
     required   Ports/packages that a port/package needs for it to be built
                and/or run.  Port Makefiles refer to this type of
                ports/packages using the BUILD_DEPENDS and RUN_DEPENDS macros,
     dependent  Ports/packages that need this port/package.

     The following command line arguments are supported:

     pkgname_glob   Specify one of these: a full pkgname, a pkgname without
                    version, a shell glob pattern in which you can use
                    wildcards `*', `?', and `[..]' (e.g.  ``zsh'', ``gnome*'',
                    ``bash-2*'', etc.), or an extended regular expression
                    preceded by a colon `:'.

                    ports_glob lists ports which pkgnames match the pattern.

                    Specify a shell glob pattern. (e.g.  ``archivers/p5-*''),
                    or an extended regular expression preceded by a colon `:'.

                    ports_glob lists ports that match the pattern.

                    Do not forget to include a slash if you want ports_glob to
                    treat a pattern as a portorigin glob.

     --help         Show help and exit.

     --force        Force to update database regardless of timestamps.

     --fetchindex   Fetch the ports index file called INDEX from the official

                    List all master ports of the given ports as well.  It also
                    lists the master ports of all those required by the given
                    ports if -R is specified.

     --noconfig     Do not read the configuration file -

     --recursive    List all those ports depending on the given ports as well.

                    List all those ports required by the given ports as well.

     --update       Update or create the ports database file INDEX.db from the
                    ports index file.  It is in binary form and meant to be
                    fast to search for information.

                    Note: the ports database file is automatically updated if
                    it is not up-to-date when looked up, so manual updating is
                    not mandatory.

     --updateindex  Update or create the INDEX file by running ``make index''.
                    If you define special macros in /etc/make.conf and the
                    dependency of some ports are changed, you should create
                    INDEX by yourself by using this option.  Otherwise, using
                    -F option is recommended since it is much faster.

     -x portorigin_glob
     --exclude portorigin_glob
                    Exclude ports matching the specified glob pattern from the

     PORTSDIR       Alternative location for the ports tree.  Default is

     PORTS_INDEX    Alternative location for the ports INDEX file.  Default is

                    It is recommendable that you set this variable to
                    something other than the default to avoid conflict with
                    CVS, CVSup, or CTM.

     PORTS_DBDIR    Alternative location for the ports database file.  The
                    database file will be located in the first writable
                    directory in the following ones: $PORTS_DBDIR, $PORTSDIR,
                    /usr/ports, $PKG_DBDIR, /var/db/pkg, $TMPDIR, /var/tmp,
                    and /tmp.

     PKGTOOLS_CONF  Configuration file for the pkgtools suite.  Default is

     /var/db/pkg                Default location of the installed package

     /usr/ports                 Default location of the ports tree.

     INDEX                      Ports index file, located right under the
                                ports tree.

     INDEX.db                   Ports database file, located in $PORTS_DBDIR.

     $PREFIX/etc/pkgtools.conf  Default location of the pkgtools configuration

     pkgdb(1), portversion(1), pkgtools.conf(5), ports(7)

     Akinori MUSHA <>

     -S -/ --slave-recursive is not implemented yet.

     -M is very slow due to the limitation of make(1) and ports(7).

FreeBSD                          June 13, 2006                         FreeBSD


Want to link to this manual page? Use this URL:

home | help