PKG-AUTOREMOVE(8)
π PKG-AUTOREMOVE(8) β the "bestie, clean up your room" of manpages β¨
okay so listen, this is the pkg autoremove page from the System Manager's Manual, and it's literally about Marie Kondo-ing your package collection. no cap.
π NAME π
pkg autoremove β it removes those orphan packages that nobody's checking for anymore π like when your dependencies ghost you after an uninstall and leave their stuff everywhere. rude.
β¨ SYNOPSIS β¨
pkg autoremove [-Dnqy]
pkg autoremove [--{dry-run,no-scripts,quiet,yes}]
π¦ DESCRIPTION π¦
okay so <pink>pkg autoremove</pink> is literally the cleanup crew of your package manager. it removes orphan packages β these are packages that got installed automatically during dependency resolution (you know, the background characters that only existed to support the main character package), and now that the main character is gone, they're just sitting there collecting dust. no longer needed. it's giving "left on read." π«Ά
so when you run this, pkg does a vibe check on your whole package tree, finds the ones that are only there because something else needed them, and if that something else is gone? bye bestie. πβ¨
πΈ OPTIONS πΈ
the following options are supported by <pink>pkg autoremove</pink> β and yes, you can mix and match, they're all besties:
-n,--dry-runβ dry-run mode, aka the "look but don't touch" era. the list of changes to packages is always printed, but no changes are actually made. it's basically window shopping for deletions ποΈ no commitment, no consequences. obsessed.-D,--no-scriptsβ if a deinstallation script exists for a given package, do not execute it. so like, the package still gets removed, but its little goodbye script (the one that runs on uninstall) gets skipped. use this when you don't trust the script or you're in a hurry and the script is extra π-q,--quietβ force quiet output. it shuts up the chatter. for when you want the facts and not the commentary, i guess. (but like, where's the fun in that π)-y,--yesβ assume yes when asked for confirmation before package autoremoval. it's the "yes bestie, go off, do the thing" flag. no more pressing y a million times. self-care. π§ββοΈ
π ENVIRONMENT π
the following environment variables affect the execution of <pink>pkg autoremove</pink>. see pkg.conf(5) for further description. (iykyk, it's all in the config bestie.)
DEFAULT_ALWAYS_YESβ sets the default for always-yes behavior. it's the main character of "just do it already" energy πASSUME_ALWAYS_YESβ makes it assume yes, always. like, always always. no take-backsies. π₯HANDLE_RC_SCRIPTSβ controls whether rc scripts get handled. you know, the startup scripts. the little morning routines of your packages π§PKG_DBDIRβ where the package database lives. the home address. the group chat archive. don't move it unless you know what you're doing bestie π
π FILES π
see pkg.conf(5). that's it. that's the whole section. it's giving minimal effort but honestly same π
π SEE ALSO π
okay so this list is lowkey iconic β it's every pkg-adjacent manpage you could ever want to read (or skim while pretending to work). all of them, in order, no filter:
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-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-unregister(8)pkg-update(8)pkg-updating(8)pkg-upgrade(8)pkg-version(8)pkg-which(8)
and that's the whole page bestie. go forth, run pkg autoremove, and let the orphans find peace ποΈβ¨
β Debian Β· May 3, 2021 Β· PKG-AUTOREMOVE(8) β mwah, ily, read your manpages π
π¦ 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