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
PKG-INSTALL(8)          FreeBSD System Manager's Manual         PKG-INSTALL(8)

     pkg install - installs packages from remote package repositories

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

     pkg install is used for installation of packages from a 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 first updates any out-of-date repository catalogues, unless
     REPO_AUTOUPDATE has been set to NO in pkg.conf.

     It then 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.

     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.

     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.

     Packages are fetched from the repositories into the local package cache
     if they are not already present, or if the checksum of the cached package
     file differs from the one in the repository.  Packages may be downloaded
     from any of the repositories mentioned in pkg.conf(5) or in the files in
     /usr/local/etc/pkg/repo.  See pkg-repository(5) for details.

     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.

     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

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

     -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

     -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.

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







     See pkg.conf(5).

     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-config(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)

FreeBSD 11.0-PRERELEASE          June 30, 2013         FreeBSD 11.0-PRERELEASE


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

home | help