pkg-delete.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 April 8, 2021 18 .Dt PKG-DELETE 8 19 .Os 20 .Sh NAME 21 .Nm "pkg delete" 22 .Nd deletes packages from the database and the system 23 .Sh SYNOPSIS 24 .Nm 25 .Op Fl DfnqRy 26 .Op Fl Cgix 27 .Ar pkg-name ... 28 .Nm 29 .Op Fl Dnqy 30 .Fl a 31 .Pp 32 .Nm 33 .Op Cm --{no-scripts,force,dry-run,quiet,recursive,yes,autoremove} 34 .Op Cm --{case-sensitive,glob,case-insensitive,regex} 35 .Ar pkg-name ... 36 .Nm 37 .Op Cm --{no-scripts,dry-run,quiet,yes,autoremove} 38 .Cm --all 39 .Sh DESCRIPTION 40 .Nm 41 is used for deleting installed packages from the system. 42 .Nm 43 creates a work-list of all the installed packages matching the package 44 names on the command line. 45 The list is presented to the user. 46 If the user confirms that they do want to remove those packages, or 47 if the 48 .Cm ASSUME_ALWAYS_YES 49 configuration option is set, 50 .Nm 51 proceeds to remove the listed packages. 52 .Pp 53 If the set of packages to be deleted would leave installed packages 54 with unfulfilled dependencies, 55 .Nm 56 will add the packages with unfulfilled dependencies to the list of 57 packages to be deleted, unless forced to proceed without deleting any 58 other packages by the 59 .Fl f 60 option. 61 .Pp 62 .Nm 63 avoids deleting itself unless named specifically on the command line. 64 So, for instance, 65 .Nm Fl a 66 will delete all packages except for the 67 .Xr pkg 8 68 package. 69 To force all packages to be removed without exception, use 70 .Nm Fl fa . 71 .Sh OPTIONS 72 The following options are supported by 73 .Nm : 74 .Bl -tag -width recursive 75 .It Fl a , Cm --all 76 Deletes all installed packages except for 77 .Xr pkg 8 78 from the system and cleans the database of information related to removed 79 packages. 80 .It Fl C , Cm --case-sensitive 81 Make the standard or regular expression 82 .Fl ( x ) 83 matching against 84 .Ar pkg-name 85 case sensitive. 86 .It Fl D , Cm --no-scripts 87 If a deinstallation script exists for a given package, do not execute it. 88 .It Fl f , Cm --force 89 Forces packages to be removed despite leaving unresolved dependencies. 90 In combination with the 91 .Fl a 92 or 93 .Fl -all 94 flag, causes 95 .Xr pkg 8 96 to be removed as well as all other packages. 97 .It Fl g , Cm --glob 98 Treat the package names as shell glob patterns. 99 .It Fl i , Cm --case-insensitive 100 Make the standard or regular expression 101 .Fl ( x ) 102 matching against 103 .Ar pkg-name 104 case insensitive. 105 This is the default, unless modified by setting 106 .Ev CASE_SENSITIVE_MATCH 107 to true in 108 .Pa pkg.conf . 109 .It Fl n , Cm --dry-run 110 Dry run mode. 111 The list of packages to delete is always printed, but no packages are 112 actually deleted. 113 .It Fl q , Cm --quiet 114 Force quiet output, except where 115 .Fl n 116 is also used, when 117 .Nm 118 will show the list of packages to be deleted. 119 .It Fl R , Cm --recursive 120 Delete all packages that require the listed packages as well. 121 .It Fl x , Cm --regex 122 Treat the package names as regular expressions according to the 123 "modern" or "extended" syntax of 124 .Xr re_format 7 . 125 .It Fl y , Cm --yes 126 Assume yes when asked for confirmation before package deletion. 127 .It Cm --autoremove 128 After deleting the requested packages, automatically remove any orphaned 129 packages that were installed as dependencies and are no longer required. 130 This is equivalent to running 131 .Xr pkg-autoremove 8 132 after the deletion. 133 Can also be enabled permanently via the 134 .Cm AUTOREMOVE 135 option in 136 .Xr pkg.conf 5 . 137 .It Cm --script-no-exec 138 Do not execute the pre-deinstall and post-deinstall scripts but still log 139 the scripts in the package database for future reference. 140 Unlike 141 .Fl D , 142 which prevents scripts from both running and being recorded, 143 .Cm --script-no-exec 144 only suppresses execution. 145 .El 146 .Sh ENVIRONMENT 147 The following environment variables affect the execution of 148 .Nm . 149 See 150 .Xr pkg.conf 5 151 for further description. 152 .Bl -tag -width ".Ev NO_DESCRIPTIONS" 153 .It Ev DEFAULT_ALWAYS_YES 154 .It Ev ASSUME_ALWAYS_YES 155 .It Ev HANDLE_RC_SCRIPTS 156 .It Ev PKG_DBDIR 157 .It Ev CASE_SENSITIVE_MATCH 158 .El 159 .Sh FILES 160 See 161 .Xr pkg.conf 5 . 162 .Sh SEE ALSO 163 .Xr pkg_create 3 , 164 .Xr pkg_printf 3 , 165 .Xr pkg_repo_create 3 , 166 .Xr pkg_repos 3 , 167 .Xr pkg-keywords 5 , 168 .Xr pkg-lua-script 5 , 169 .Xr pkg-repository 5 , 170 .Xr pkg-script 5 , 171 .Xr pkg-triggers 5 , 172 .Xr pkg.conf 5 , 173 .Xr pkg 8 , 174 .Xr pkg-add 8 , 175 .Xr pkg-alias 8 , 176 .Xr pkg-annotate 8 , 177 .Xr pkg-audit 8 , 178 .Xr pkg-autoremove 8 , 179 .Xr pkg-check 8 , 180 .Xr pkg-clean 8 , 181 .Xr pkg-config 8 , 182 .Xr pkg-create 8 , 183 .Xr pkg-fetch 8 , 184 .Xr pkg-help 8 , 185 .Xr pkg-info 8 , 186 .Xr pkg-install 8 , 187 .Xr pkg-key 8 , 188 .Xr pkg-lock 8 , 189 .Xr pkg-plugins 8 , 190 .Xr pkg-query 8 , 191 .Xr pkg-register 8 , 192 .Xr pkg-repo 8 , 193 .Xr pkg-repositories 8 , 194 .Xr pkg-rquery 8 , 195 .Xr pkg-search 8 , 196 .Xr pkg-set 8 , 197 .Xr pkg-shell 8 , 198 .Xr pkg-shlib 8 , 199 .Xr pkg-ssh 8 , 200 .Xr pkg-stats 8 , 201 .Xr pkg-triggers 8 , 202 .Xr pkg-unregister 8 , 203 .Xr pkg-update 8 , 204 .Xr pkg-updating 8 , 205 .Xr pkg-upgrade 8 , 206 .Xr pkg-version 8 , 207 .Xr pkg-which 8