GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PKG_REPLACE(1) FreeBSD General Commands Manual PKG_REPLACE(1)

pkg_replacea utility for upgrading installed packages

pkg_replace [-abBcCddfFhiJknNOpPPqrRRuUvVwW] [--all] [--automatic] [--batch] [--backup-package | --no-backup-package] [--clean | --no-clean] [--cleanup | --no-cleanup] [--cleandeps | --no-cleandeps] [--config | --no-config] [--force-config | --no-force-config] [--debug] [--makedb] [--no-backup] [--no-configfile] [--vebose | --no-verbose] [--version] [-j jobs] [-l file] [-L prefix] [-m make_args] [-M make_env] [-t make_target] [-x pkgname] [-X pkgname] [[pkgname[=package]] [package] [glob] [pkgorigin] ...]

The pkg_replace command is used to upgrade installed packages.

The following options are supported:

, --all
Do with all the installed packages.
Set automatic flag for the package. This affects the operation of pkg-autoremove(8).
, --backup-package
Keep backup packages of the old versions. By default, the created backup package will be deleted after installation. See also, --no-backup-package
, --no-backup
Do not backup old packages before uninstall old packages.
Run an upgrading process in a batch mode (with BATCH=yes).
, --config
Do “make config-conditional” before build. See also, --no-config.
, --force-config
Do “make config” before build. See also, --no-force-config.
Do “make clean” before build. See also, -w, --no-clean.
Clean files that record dependencies in the PKG_REPLACE_DB_DIR. This option overrides --no-cleandeps. By default, pkg_replace do not clean files in the PKG_REPLACE_DB_DIR. This option should be useful when the dependencies of packages are new or modified. See also, -dd, -RR.
Do “make clean” after build. This is the default. See also, -W, --no-cleanup.
, -R
In addition to the specified packages, replace all packages that required by those packages as well.
, -RR
Strictly checking dependencies more than -d, -R, e.g. build dependencies. However, this mode is slow. So, pkg_replace creates files that record dependencies in the PKG_REPLACE_DB_DIR directory to run as fast as possible. See config file, pkg_replace.conf.sample. If you set --cleandeps, pkg_replace clean these files in the PKG_REPLACE_DB_DIR.

This option may fail when there are dependency problems (e.g., packages have looped dependencies, packages removed the ports tree). Especially, be careful when using -a option at the same time.

Debug mode. Execute with “set -x” option.
Force to replace packages.
Fetch distfiles or packages, do not replace.
Show help and exit.
Turn on interactive mode.
jobs
Number of parallel jobs. Default value gets from `sysctl -n hw.ncpu`.
Do not install the target packages, but install the dependencies.
Force the upgrade of a package even if some of the requisite packages have failed to upgrade in advance.
FILE
Save the results to FILE. By default, pkg_replace does not save results.
PREFIX
Save the logs in the files that begins with PREFIX.
ARGS
Specify arguments to append to each make(1) command. Please see section EXAMPLES.
Create files that record dependencies of packages in the PKG_REPLACE_DB_DIR.
ARGS
Specify arguments to prepend to each make(1) command.
Do not actually replace any packages.
Do not keep backup packages the old versions. Override -b.
Do not clean the PKG_REPLACE_DB_DIR. This is the default. See also, -dd, -RR.
Do not read the configuration file pkg_replace.conf.
Do not “make config-conditional” bofore build. Override --config.
Do not “make config” bofore build. Override --force-config.
Turn off verbose output. Override -v, --verbose.
Install new packages, do not replace.
Do not check the dependencies before building the target packages.
Do “make package”.
Use binary packages instead of installing from source. pkg_replace finds them from the directory specified by PKGREPOSITORY, and the remote site specified by PACKAGEROOT.
Be forced to use binary packages. Never use the port even if a package is not available either locally or remotely.
In addition to the specified packages, replace all packages that depend on those packages as well.
make_target
Do “make make_target” only.
Unlock packages before deinstall packages and lock packages again after install.
Do not preserve old shared libraries. By default, pkg_replace preserves old shared libraries in PKGCOMPATDIR. But if the new library and the old library have the same name, the old library is removed from PKGCOMPATDIR.
, --verbose
Turn on verbose output.
List the installed packages that need updating.
Print pkg_replace version.
, --no-clean
Do not “make clean” before each build. This is the default. See also, --clean
, --no-cleanup
Do not “make clean” after each installation. See also, --cleanup
glob
Do not replace packages matching the specified glob pattern.
glob
Remove the libraries in PKGCOMPATDIR, when the specified packages have the libraries with the same name as the one in PKGCOMPATDIR. This may be useful when there are errors due to a mixture of old and new libraries.

See also, pkg_replace.conf.

PACKAGEROOT
Default is https://pkg.FreeBSD.org.
PKGCOMPATDIR
Defaut location is %%PKGCOMPATDIR%%.
PKGREPOSITORY
Default location is /var/cache/pkg/All.
PKG_REPLACE_DB_DIR
Default location is /var/db/pkg_replace.

  • pkgname and glob examples: name-version, name and shell glob.

    glib-2.36.3_2, glib and 'glib*' or glib\*
  • pkgorigin examples: pkgorigin and pkgorigin@flavor.

    devel/glib20 and graphics/py-cairo@py37
  • Path: Absolute and relative paths are allowed.

    pkg_replace glib=../glib20-new
    or
    pkg_replace glib=/home/foo/ports/glib20
  • Install glib:

    pkg_replace -N devel/glib20
  • Install py-cairo with FLAVOR=py37:

    pkg_replace -N graphics/py-cairo@py37
  • Replace glib:

    pkg_replace glib
  • Replace perl and all packages that depend on it:

    pkg_replace -r perl
  • If the xterm package is already installed, replace it with xterm-220:

    pkg_replace /usr/ports/packages/All/xterm-220.tbz
  • Replace XFree86-libraries with /usr/ports/x11/xorg-libraries:

    pkg_replace XFree86-libraries=/usr/ports/x11/xorg-libraries
  • Replace XFree86-libraries with pkgorigin: x11/xorg-libraries:

    pkg_replace XFree86-libraries=x11/xorg-libraries
  • Replace XFree86-libraries with /var/tmp/xorg-libraries-6.9.0 package:

    pkg_replace XFree86-libraries=/var/tmp/xorg-libraries-6.9.0.tbz
  • Replace graphics/py-cairo with FLAVOR=py37:

    pkg_replace -m FLAVOR=py37 graphics/py-cairo
    or
    pkg_replace graphics/py-cairo@py37
  • Do “make configure” only:

    pkg_replace -t configure pkgname

The portupgrade(1) options -A, -B, -D, -e, -o, -q, -s, -S and -y are no longer supported.

portupgrade(1), pkg(8), ports(7),

Securedog ⟨securedog@users.sourceforge.jp⟩
Ken DEGUCHI ⟨kdeguchi@sz.tokoha-u.ac.jp⟩

Sure to be some.

August 8, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.