PKG(8)

NAME
pkg, pkg-static - a utility for manipulating packages

SYNOPSIS
pkg [-v] [-d] [-j <jail name or id> | -c <chroot path>] <command> <flags>

DESCRIPTION
provides an interface for manipulating packages - registering, adding, removing and upgrading of packages. pkg-static is a statically linked variant of pkg typically only used for the initial installation of pkg. There are some differences in functionality. See pkg.conf(5) for details.

OPTIONS
The following options are supported by pkg:

-v  Displays the current version of pkg

-d  Show debug information

-j <jail name or id>
    pkg will execute in the given <jail name or id>, where name matches “jls name” and id matches “jls jid”. See jail(8) and jls(8).

-c <chroot path>
    pkg will chroot in the <chroot path> Environment

COMMANDS
The following commands are supported by pkg:

help <command>
    Display usage information of the specified command.

add Install a package from either a local source or a remote one.

    When installing from remote source you need to specify the protocol to use when fetching the package.

    Currently supported protocols are FTP, HTTP and HTTPS.

audit
    Audits installed packages against known vulnerabilities.

autoremove
    Delete packages which were automatically installed as dependencies and are not required any more.

backup
    Dump the local package database to a file specified on the command-line.

check
    Sanity checks installed packages.

clean
    Cleans the local cache of fetched remote packages.

create
    Create a package

delete
    Delete a package from the database and the system.

fetch
    Fetches packages from a remote repository.

info
    Display information about installed packages.

install
    Install a package from a remote package repository. If a package is found in more than one remote repository, then installation happens from the first one. Downloading a package is tried from each package repository in turn, until the package is successfully fetched.

query
    Query information about installed packages.

register
    Register a package in the database.

repo
    Create a local package repository for remote usage.

rquery
    Query information for remote repositories.

search
    Search for the given pattern in the remote package repositories.

set Modify information in the installed database.

shell
    Fires up a sqlite shell to the local or remote database. Extreme care should be taken when using this command.

shlib
    Displays which packages link to a specific shared library.

stats
    Display package database statistics.

update
    Update the available remote repositories as listed in pkg.conf(5).

updating
    Displays UPDATING entries of installed packages.

upgrade
    Upgrade a package to a newer version.

version
    Summarize installed versions of packages.

which
    Query the database for package(s) that installed a specific file.

ENVIRONMENT
The list of environment variables that affect the execution of pkg is in pkg.conf(5).

FILES
See pkg.conf(5).

SEE ALSO
pkg.conf(5), pkg-add(8), pkg-audit(8), pkg-autoremove(8), pkg-backup(8), pkg-check(8), pkg-clean(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-info(8), pkg-install(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8), pkg-stats(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)

HISTORY
The pkg command first appeared in FreeBSD 9.1.

AUTHORS AND CONTRIBUTORS
Baptiste Daroussin <bapt@FreeBSD.org> Julien Laffaye <jlaffaye@FreeBSD.org> Philippe Pepiot <phil@philpep.org> Will Andrews <will@FreeBSD.org> Marin Atanasov Nikolov <dnaeon@gmail.com> Bryan Drewery <bryan@shatow.net> Matthew Seaman <matthew@FreeBSD.org>

BUGS
See the issue tracker at https://github.com/pkgng/pkgng/issues