PKG-INSTALL(8)

NAME
pkg install - installs packages from remote package repositories

SYNOPSIS
pkg install [-AfgIinFqRUxy] [-r reponame] pkg-origin ...

DESCRIPTION
pkg install is used for installation of packages from a remote package repository. Multiple package names can be specified on the command line, either explicitly or by matching against package names in the repository catalogues using shell globbing or regular expressions.

pkg install creates a work-list of all the package installations to do. Any already installed and up to date packages will be dropped from the list unless the -f (force) option is supplied, in which case those packages will be reinstalled. The dependencies of packages in the list are examined and any missing packages are added to the list for installation. Such implicitly added packages are flagged as candidates for autoremoval. See pkg-autoremove(8) for details. Any already installed but out of date packages, either named on the command line or from the sum of all their dependencies are added to the work list as upgrade jobs. The work list is sorted into dependency order and pkg install will present it to the user for approval before proceeding, unless overridden by the -y option or the ASSUME_ALWAYS_YES setting in pkg.conf.

Autoremoval flags are sticky, and will persist over reinstallation or upgrade of the packages concerned, even if subsequently the packages are named explicitly on a command line. See pkg-query(8) for finding the autoremoval status of a package, and pkg-set(8) for modifying it.

Currently pkg install will only use one repository to install packages from. When PACKAGESITE is set in the environment, or the equivalent PACKAGESITE setting is present in pkg.conf only that site will be used.

Alternatively, when in multi-repo mode, the -r option may be used to select one of the package repositories listed in the configuration file. Otherwise the default repository will be used.

Multiple package repository support is only activated when neither the environment variable PACKAGESITE nor the equivalent PACKAGESITE configuration setting are defined.

Package repository catalogues will be automatically updated whenever pkg-update(8) is run, unless disabled by the -U flag. Updating repository catalogues is highly recommended before doing any package installation with pkg install.

OPTIONS
The following options are supported by pkg install:

-A  Mark the installed packages as orphan. Will be automatically removed if no other packages depend on them. For more information please refer to pkg-autoremove(8)

-f  Force the reinstallation of the package if already installed.

-g  Treat the package names as shell glob patterns.

-I  If any installation scripts (pre-install or post-install) exist for a given package, do not execute them. When a package is updated, deinstallation scripts (pre-deinstall or post-deinstall) are not run either.

-i  Make the standard or the regular expression (-x) matching against pkg-name case insensitive.

-L  Backwards compatbility flag for -U. This is planned to be removed.

-n  Dry-run mode. The list of changes to packages is always printed, but no changes are actually made.

-F  Do not perform actual installation of packages, merely fetch packages that should be upgraded and detect possible conflicts.

-q  Force quiet output, except when -n is used, where pkg install will always show packages to be installed, upgraded or deleted.

-R  When used with -f, reinstalls any packages that require the given package.

-r reponame
    In multi-repo mode, override the pkg.conf ordering and only attempt to download packages from the named repository.

-U  Skip updating the repository catalogues with pkg-update(8). Use the locally cached copies only.

-x  Treat the package names as regular expressions according to the "modern" or "extended" syntax of re_format(7).

-y  Assume yes when asked for confirmation before package installation.

ENVIRONMENT
The following environment variables affect the execution of pkg install. See pkg.conf(5) for further description.

ASSUME_ALWAYS_YES

HANDLE_RC_SCRIPTS

PACKAGESITE

PKG_CACHEDIR

PKG_DBDIR

PKG_MULTIREPOS

FILES
See pkg.conf(5).

SEE ALSO
pkg.conf(5), pkg(8), pkg-add(8), pkg-annotate(8), pkg-audit(8), pkg-autoremove(8), pkg-backup(8), pkg-check(8), pkg-clean(8), pkg-convert(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-info(8), pkg-lock(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)