|
| 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 December 2, 2025 |
| 18 | +.Dt PKG-UNREGISTER 8 |
| 19 | +.Os |
| 20 | +.Sh NAME |
| 21 | +.Nm "pkg unregister" |
| 22 | +.Nd deletes packages from the database |
| 23 | +.Sh SYNOPSIS |
| 24 | +.Nm |
| 25 | +.Op Fl fnqRy |
| 26 | +.Op Fl Cgix |
| 27 | +.Ar pkg-name ... |
| 28 | +.Nm |
| 29 | +.Op Fl Dnqy |
| 30 | +.Fl a |
| 31 | +.Pp |
| 32 | +.Nm |
| 33 | +.Op Cm --{force,dry-run,quiet,recursive,yes} |
| 34 | +.Op Cm --{case-sensitive,glob,case-insensitive,regex} |
| 35 | +.Ar pkg-name ... |
| 36 | +.Nm |
| 37 | +.Op Cm --{dry-run,quiet,yes} |
| 38 | +.Cm --all |
| 39 | +.Sh DESCRIPTION |
| 40 | +.Nm |
| 41 | +is used for deleting installed packages from the database. |
| 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 |
| 47 | +from the db, or if the |
| 48 | +.Cm ASSUME_ALWAYS_YES |
| 49 | +configuration option is set, |
| 50 | +.Nm |
| 51 | +proceeds to remove from the db 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 from the db except for the |
| 67 | +.Xr pkg 8 |
| 68 | +package. |
| 69 | +To force all packages to be removed from the db 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 from the db 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 from the db 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 | +.El |
| 128 | +.Sh ENVIRONMENT |
| 129 | +The following environment variables affect the execution of |
| 130 | +.Nm . |
| 131 | +See |
| 132 | +.Xr pkg.conf 5 |
| 133 | +for further description. |
| 134 | +.Bl -tag -width ".Ev NO_DESCRIPTIONS" |
| 135 | +.It Ev DEFAULT_ALWAYS_YES |
| 136 | +.It Ev ASSUME_ALWAYS_YES |
| 137 | +.It Ev HANDLE_RC_SCRIPTS |
| 138 | +.It Ev PKG_DBDIR |
| 139 | +.It Ev CASE_SENSITIVE_MATCH |
| 140 | +.El |
| 141 | +.Sh FILES |
| 142 | +See |
| 143 | +.Xr pkg.conf 5 . |
| 144 | +.Sh SEE ALSO |
| 145 | +.Xr pkg_create 3 , |
| 146 | +.Xr pkg_delete 3 , |
| 147 | +.Xr pkg_printf 3 , |
| 148 | +.Xr pkg_repo_create 3 , |
| 149 | +.Xr pkg_repos 3 , |
| 150 | +.Xr pkg-keywords 5 , |
| 151 | +.Xr pkg-lua-script 5 , |
| 152 | +.Xr pkg-repository 5 , |
| 153 | +.Xr pkg-script 5 , |
| 154 | +.Xr pkg-triggers 5 , |
| 155 | +.Xr pkg.conf 5 , |
| 156 | +.Xr pkg 8 , |
| 157 | +.Xr pkg-add 8 , |
| 158 | +.Xr pkg-alias 8 , |
| 159 | +.Xr pkg-annotate 8 , |
| 160 | +.Xr pkg-audit 8 , |
| 161 | +.Xr pkg-autoremove 8 , |
| 162 | +.Xr pkg-check 8 , |
| 163 | +.Xr pkg-clean 8 , |
| 164 | +.Xr pkg-config 8 , |
| 165 | +.Xr pkg-create 8 , |
| 166 | +.Xr pkg-fetch 8 , |
| 167 | +.Xr pkg-info 8 , |
| 168 | +.Xr pkg-install 8 , |
| 169 | +.Xr pkg-key 8 , |
| 170 | +.Xr pkg-lock 8 , |
| 171 | +.Xr pkg-query 8 , |
| 172 | +.Xr pkg-register 8 , |
| 173 | +.Xr pkg-repo 8 , |
| 174 | +.Xr pkg-repositories 8 , |
| 175 | +.Xr pkg-rquery 8 , |
| 176 | +.Xr pkg-search 8 , |
| 177 | +.Xr pkg-set 8 , |
| 178 | +.Xr pkg-shell 8 , |
| 179 | +.Xr pkg-shlib 8 , |
| 180 | +.Xr pkg-ssh 8 , |
| 181 | +.Xr pkg-stats 8 , |
| 182 | +.Xr pkg-triggers 8 , |
| 183 | +.Xr pkg-update 8 , |
| 184 | +.Xr pkg-updating 8 , |
| 185 | +.Xr pkg-upgrade 8 , |
| 186 | +.Xr pkg-version 8 , |
| 187 | +.Xr pkg-which 8 |
0 commit comments