pkg-lock.8
1 .\" 2 .\" FreeBSD pkg - a next generation package for the installation and maintenance 3 .\" of non-core utilities. 4 .\" 5 .\" Redistribution and use in source and binary forms, with or without 6 .\" modification, are permitted provided that the following conditions 7 .\" are met: 8 .\" 1. Redistributions of source code must retain the above copyright 9 .\" notice, this list of conditions and the following disclaimer. 10 .\" 2. Redistributions in binary form must reproduce the above copyright 11 .\" notice, this list of conditions and the following disclaimer in the 12 .\" documentation and/or other materials provided with the distribution. 13 .\" 14 .\" 15 .\" @(#)pkg.8 16 .\" 17 .Dd March 19, 2024 18 .Dt PKG-LOCK 8 19 .Os 20 .Sh NAME 21 .Nm "pkg lock" , 22 .Nm "pkg unlock" 23 .Nd lock or unlock packages 24 .Sh SYNOPSIS 25 .Nm 26 .Op Fl lqy 27 .Op Fl a 28 .Nm 29 .Op Fl lqy 30 .Op Fl Cgix 31 .Ar pkg-name ... 32 .Nm "pkg unlock" 33 .Op Fl lqy 34 .Op Fl a 35 .Nm "pkg unlock" 36 .Op Fl lqy 37 .Op Fl Cgix 38 .Ar pkg-name ... 39 .Pp 40 .Nm 41 .Op Cm --{show-locked,quiet,yes} 42 .Op Cm --all 43 .Nm 44 .Fl -has-locked-packages 45 .Nm 46 .Op Cm --{show-locked,quiet,yes} 47 .Op Cm --{case-sensitive,glob,case-insensitive,regex} 48 .Ar pkg-name ... 49 .Nm "pkg unlock" 50 .Op Cm --{show-locked,quiet,yes} 51 .Op Cm --all 52 .Nm "pkg unlock" 53 .Op Cm --{show-locked,quiet,yes} 54 .Op Cm --{case-sensitive,glob,case-insensitive,regex} 55 .Ar pkg-name ... 56 .Sh DESCRIPTION 57 .Nm 58 is used to lock packages against reinstallation, 59 modification or deletion. 60 .Nm "pkg unlock" 61 unlocks the named packages. 62 Either variant only has an effect on currently installed packages. 63 Consequently it is impossible to block installation of a new package 64 by using this mechanism, unless such an installation implies updating 65 a locked package. 66 .Pp 67 The impact of locking a package is wider than simply preventing 68 modifications to the package itself. 69 .Cm Any 70 operation implying modification of the locked package will be 71 blocked. 72 This includes: 73 .Pp 74 .Bl -bullet -compact 75 .It 76 Attempts to reinstall, upgrade, downgrade, or delete the locked package 77 itself. 78 .It 79 Installation, upgrade, or downgrade of a package where the resultant 80 package would have a dependency on a different version of the locked 81 package. 82 .It 83 Deletion, upgrade, or downgrade of any package the locked package depends 84 upon, either directly or as a consequence of installing or upgrading 85 some third package. 86 .El 87 .Sh OPTIONS 88 The following options are supported by 89 .Nm : 90 .Bl -tag -width all 91 .It Fl a , Fl -all 92 Lock or unlock all installed packages. 93 .It Fl C , Fl -case-sensitive 94 Make the standard or the regular expression 95 .Fl ( x ) 96 matching against 97 .Ar pkg-name 98 case sensitive. 99 .It Fl g , Fl -glob 100 Treat 101 .Ar pkg-name 102 as a shell glob pattern. 103 .It Fl i , Fl -case-insensitive 104 Make the standard or the regular expression 105 .Fl ( x ) 106 matching against 107 .Ar pkg-name 108 case insensitive. 109 This is the default, unless modified by setting 110 .Ev CASE_SENSITIVE_MATCH 111 to true in 112 .Pa pkg.conf . 113 .It Fl l , Fl -show-locked 114 Show a list of all locked packages. 115 This can be used without locking or unlocking any packages, in which 116 case privileged access to the package database is not required. 117 Otherwise it will be displayed after any lock or unlock operations. 118 .It Fl q , Fl -quiet 119 Operate quietly: do not output anything other than confirmatory questions. 120 .It Fl x , Fl -regex 121 Treat 122 .Ar pkg-name 123 as a regular expression according to the "modern" or "extended" syntax 124 of 125 .Xr re_format 7 . 126 .It Fl y , Fl -yes 127 Assume "yes" as the answer to all questions. 128 .It Fl -has-locked-packages 129 Return 0 if at least one package is locked, 1 otherwise 130 .El 131 .Sh ENVIRONMENT 132 The following environment variables affect the execution of 133 .Nm . 134 See 135 .Xr pkg.conf 5 136 for further description. 137 .Bl -tag -width ".Ev NO_DESCRIPTIONS" 138 .It Ev PKG_DBDIR 139 .It Ev DEFAULT_ALWAYS_YES 140 .It Ev ASSUME_ALWAYS_YES 141 .It Ev CASE_SENSITIVE_MATCH 142 .El 143 .Sh FILES 144 See 145 .Xr pkg.conf 5 . 146 .Sh SEE ALSO 147 .Xr pkg_create 3 , 148 .Xr pkg_printf 3 , 149 .Xr pkg_repo_create 3 , 150 .Xr pkg_repos 3 , 151 .Xr pkg-keywords 5 , 152 .Xr pkg-lua-script 5 , 153 .Xr pkg-repository 5 , 154 .Xr pkg-script 5 , 155 .Xr pkg-triggers 5 , 156 .Xr pkg.conf 5 , 157 .Xr pkg 8 , 158 .Xr pkg-add 8 , 159 .Xr pkg-alias 8 , 160 .Xr pkg-annotate 8 , 161 .Xr pkg-audit 8 , 162 .Xr pkg-autoremove 8 , 163 .Xr pkg-check 8 , 164 .Xr pkg-clean 8 , 165 .Xr pkg-config 8 , 166 .Xr pkg-create 8 , 167 .Xr pkg-delete 8 , 168 .Xr pkg-fetch 8 , 169 .Xr pkg-help 8 , 170 .Xr pkg-info 8 , 171 .Xr pkg-install 8 , 172 .Xr pkg-key 8 , 173 .Xr pkg-plugins 8 , 174 .Xr pkg-query 8 , 175 .Xr pkg-register 8 , 176 .Xr pkg-repo 8 , 177 .Xr pkg-repositories 8 , 178 .Xr pkg-rquery 8 , 179 .Xr pkg-search 8 , 180 .Xr pkg-set 8 , 181 .Xr pkg-shell 8 , 182 .Xr pkg-shlib 8 , 183 .Xr pkg-ssh 8 , 184 .Xr pkg-stats 8 , 185 .Xr pkg-triggers 8 , 186 .Xr pkg-unregister 8 , 187 .Xr pkg-update 8 , 188 .Xr pkg-updating 8 , 189 .Xr pkg-upgrade 8 , 190 .Xr pkg-version 8 , 191 .Xr pkg-which 8