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

pkg lock, pkg unlock
lock or unlock packages

pkg lock [-lqy] [-a]

pkg lock [-lqy] [-Cgix] pkg-name ...

pkg unlock [-lqy] [-a]

pkg unlock [-lqy] [-Cgix] pkg-name ...


pkg lock [--{show-locked,quiet,yes}] [--all]

pkg lock --has-locked-packages

pkg lock [--{show-locked,quiet,yes}] [--{case-sensitive,glob,case-insensitive,regex}] pkg-name ...

pkg unlock [--{show-locked,quiet,yes}] [--all]

pkg unlock [--{show-locked,quiet,yes}] [--{case-sensitive,glob,case-insensitive,regex}] pkg-name ...

pkg lock is used to lock packages against reinstallation, modification or deletion. pkg unlock unlocks the named packages. Either variant only has an effect on currently installed packages. Consequently it is impossible to block installation of a new package by using this mechanism, unless such an installation implies updating a locked package.

The impact of locking a package is wider than simply preventing modifications to the package itself. Any operation implying modification of the locked package will be blocked. This includes:

  • Attempts to reinstall, up- or downgrade or delete the locked package itself.
  • Installation, up- or downgrade of a package where the resultant package would have a dependency on a different version of the locked package.
  • Deletion, up- or downgrade of any package the locked package depends upon, either directly or as a consequence of installing or upgrading some third package.

The following options are supported by pkg lock:
, ---all
Lock or unlock all installed packages.
, --case-sensitive
Make the standard or the regular expression (-x) matching against pkg-name case sensitive.
, --glob
Treat pkg-name as a shell glob pattern.
, --case-insensitive
Make the standard or the regular expression (-x) matching against pkg-name case insensitive. This is the default, unless modified by setting CASE_SENSITIVE_MATCH to true in pkg.conf.
, --show-locked
Show a list of all locked packages. This can be used without locking or unlocking any packages, in which case privileged access to the package database is not required. Otherwise it will be displayed after any lock or unlock operations.
, --quiet
Operate quietly: do not output anything other than confirmatory questions.
, --regex
Treat pkg-name as a regular expression according to the "modern" or "extended" syntax of re_format(7).
, --yes
Assume "yes" as the answer to all questions.
Return 0 if at least one package is locked, 1 otherwise

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

See pkg.conf(5).

pkg_create(3), pkg_printf(3), pkg_repos(3), pkg-keywords(5), pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5), pkg.conf(5), pkg(8), pkg-add(8), pkg-alias(8), pkg-annotate(8), pkg-audit(8), pkg-autoremove(8), pkg-backup(8), pkg-check(8), pkg-clean(8), pkg-config(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-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)
January 14, 2021 FreeBSD 13.1-RELEASE

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

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