PKG-UNREGISTER(8)
okay bestie, pull up a chair π
this is pkg unregister from section 8 of the System Manager's Manual β yes, the big scary one, but it's literally just the "delete package records" girlie and she's very good at her job. let's get into it π«Ά
β¨ NAME β¨
pkg unregister β deletes package records from the database ποΈβ¨
πΈ SYNOPSIS πΈ
pkg unregister [-fnqRy] [-Cgix] pkg-name ...
pkg unregister [-nqy] -a
pkg unregister [--{force,dry-run,quiet,recursive,yes}]
[--{case-sensitive,glob,case-insensitive,regex}] pkg-name ...
pkg unregister [--{dry-run,quiet,yes}] --all
π¦ DESCRIPTION π¦
so pkg unregister deletes installed packages from the database. like, records β she's doing db surgery, not touching your files, ok? π©Ίβ¨
here's the flow: she builds a work-list of every installed package that matches the package names you gave her on the command line, then she shows you that list. if you confirm you actually wanna remove those packages from the db β or if the ASSUME_ALWAYS_YES configuration option is set β she goes ahead and removes the listed packages from the db. easy π
now, the dependency tea β: if unregistering your set of packages would leave other installed packages with unfulfilled dependencies, pkg unregister will add those dependency-having packages to the list of packages to be unregistered too β unless you force her to proceed without unregistering any other packages using the -f option. she's not gonna leave anyone stranded, fr fr π
and this is important, bestie β she avoids deleting herself unless she's named specifically on the command line. so for example, pkg unregister -a will unregister all packages from the db except the pkg(8) package. if you truly want all packages unregistered from the db without exception, use pkg unregister -fa. π₯ (yeah, she'll take herself out too. main character energy π)
π OPTIONS π
the following options are supported by pkg unregister:
-a,--allβ deletes all installed packages from the db except forpkg(8), and cleans the database of information related to the removed packages. the full send π§Ήβ¨-C,--case-sensitiveβ makes the standard or regular expression (-x) matching against pkg-name case sensitive. uppercase girlies respect uppercase π-f,--forceβ forces packages to be removed from the db even though that leaves unresolved dependencies behind. combined with the-aor--allflag, it causespkg(8)to be removed as well as all the other packages. no survivors ππ₯-g,--globβ treats the package names as shell glob patterns.*girlies rise π-i,--case-insensitiveβ makes the standard or regular expression (-x) matching against pkg-name case insensitive. this is the default, unless it's been modified by settingCASE_SENSITIVE_MATCHto true inpkg.conf. lowercase supremacy π-n,--dry-runβ dry run mode. the list of packages to delete is always printed, but no packages are actually deleted. window shopping only ποΈπ-q,--quietβ forces quiet output, except where-nis also used β in that casepkg unregisterwill show the list of packages to be deleted. shhh π€«-R,--recursiveβ delete all packages that require the listed packages as well. it's giving "you come with your friends" ππ«Ά-x,--regexβ treats the package names as regular expressions according to the "modern" or "extended" syntax ofre_format(7). fancy matching hours π§ββοΈ-y,--yesβ assume yes when asked for confirmation before package deletion. no thoughts, just yes β¨
π ENVIRONMENT π
the following environment variables affect how pkg unregister runs. see pkg.conf(5) for further description, iykyk π
DEFAULT_ALWAYS_YESASSUME_ALWAYS_YESHANDLE_RC_SCRIPTSPKG_DBDIRCASE_SENSITIVE_MATCH
π FILES π
see pkg.conf(5). that's it, that's the whole section, she's concise πΈ
π SEE ALSO π
the whole friend group showed up for this one, obsessed π«Άπ
pkg_create(3), pkg_printf(3), pkg_repo_create(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-check(8), pkg-clean(8), pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8), pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(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)
and that's the whole page, bestie β go unregister something responsibly π
this one came from Debian, dated December 13, 2025 β yeah she's fresh, slay πβ¨
π¦ where this page comes from
- nixos 26.05: pkg 2.7.5
- nixpkgs unstable: pkg 2.7.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms