DEBFOSTER(8)
π DEBFOSTER(8) π
okay so this is debfoster from the System Manager's Manual, and bestie, it is so good. It weeds unnecessary Debian packages. Let's get into it. π
β¨ NAME β¨
debfoster β weed unnecessary Debian packages πΏ
πΈ SYNOPSIS πΈ
debfoster [-acdefhiknopqrstvV] [--verbose] [--version] [--help]
[--quiet] [--force] [--mark-only] [--upgrade] [--config file]
[--keeperfile file] [--no-keeperfile] [--ignore-default-rules]
[--show-keepers] [--show-orphans] [--show-depends package]
[--show-dependents package] [--show-providers package]
[--show-related package] [--use-tasks] [--option opt=val]
[package1 ...] [package2- ...]
π¦ DESCRIPTION π¦
So here's the vibe: debfoster keeps a list of installed packages that you explicitly requested, as opposed to the ones that just showed up because something else dragged them in as a dependency. No invited-plus-one energy here.
Every single argument is entirely optional, fr fr β you can just run debfoster on its own, per se, after every run of dpkg and/or apt-get. π«Ά
Alternatively you can use debfoster to install and remove packages by listing them on the command line. The rule is iconic and simple:
- packages suffixed with a
-get removed - packages with no suffix get installed
π
If a new package shows up, or if debfoster notices that a package that used to be a dependency is now an orphan, it's gonna ask you what to do with it. If you say keep it, debfoster just takes note and moves on, nbd. If you decide this package is not interesting enough, it gets removed as soon as debfoster is done asking questions. And if your choices cause other packages to become orphaned? More questions ensue. π It's giving cascade.
Whenever debfoster asks you about a package, any of these responses are on the menu:
βyββ Yes, keep the package. This is the default response. πβnββ No, delete the package. πβpββ Prune the package. This tellsdebfosterto also delete all packages that are only installed because this package depends on them. A list of such packages, if any, is shown above the prompt.βsββ Skip this question. The next time you rundebfosterit will ask you again about this package.βhββ Print a help message.βiβorβ?ββ Show information about the package.βuββ Undo last response. β©οΈβqββ Exit without removing packages. All changes will be lost.βxββ Save changes to thedebfosterdatabase, remove unwanted packages, and exit without asking further questions.
π Command line options π
-v,--verboseβdebfosterwill show which packages have disappeared, have become dependencies or (if Quiet is enabled) have become orphans. π-V,--versionβ Display version and copyright information.-h, -FL -helpβ Display a concise summary of the available options and argument syntax.-f,--forceβ Don't ask anything and assume βnoβ as the answer to all questions. It also installs any packages that seem to be missing, thus forcing your system to comply with thedebfosterdatabase.
Can have βinterestingβ results if you're not careful. π Like, genuinely, be careful.
-q,--quietβ Don't ask anything and assume βyesβ as the answer to all questions. Useful to create an initial/var/lib/debfoster/keepersfile or to recreate it after changing the configuration file. π§-m,--mark-onlyβ Instructsdebfosterto make changes to the keeper file but not to actually install or delete any packages. This can be used to βeditβ a keeper file by invokingdebfosterone or more times in a row. The changes can then be committed by invokingdebfosterwith the--forceoption, which will delete/install any necessary packages. This is mainly useful for scripts and frontends, but may be useful from the command line as well.-u,--upgradeβ If used asdebfoster -u packageit will install or upgrade the packages specified on the command line and try to upgrade all packages that it relies on.-c,--config fileβ Specify a different configuration file to use. π-k,--keeperfile fileβ Specify a differentdebfosterdatabase to use.-n,--no-keeperfileβ Don't read thedebfosterdatabase and start with an empty list.-i,--ignore-default-rulesβ This will instructdebfosterto ignore theUseHold,UseEssential,MaxPriority,KeepSections, andNokeepSectionssettings in the config file (i.e., assume that any package can be an orphan). This is a good option for those who really want to make sure their system is squeaky clean. It's also useful when sharing or transferring a keeper file between multiple machines where different config files can cause some confusion. Properly used,-ieliminates that uncertainty. β¨-a,--show-keepersβ Lists the contents of thedebfosterdatabase.-s,--show-orphansβ List all orphaned packages that are not mentioned in thedebfosterdatabase. π₯Ί-d,--show-depends packageβ List all packages that this package depends on.-e,--show-dependents packageβ List all packages in thedebfosterdatabase that depend on this package.-p,--show-providers packageβ List all packages that provide the dependency target specified by package (e.g."debfoster -p x-terminal-emulator").-r,--show-related packageβ List all packages that are only installed because this package depends on them.-t,--use-tasksβ Make tasks visible as packages. This will make tasks that are selectable usingtasksel(1)appear as packages namedtask-<label>. π-o,--option opt=valβ Override any configuration option specified in the configuration file.
and that's where part 1 wraps, bestie β more coming, don't go anywhere π
π CONFIGURATION π
okay bestie so debfoster is lowkey customizable, and the way you do that is through its config file, /etc/debfoster.conf. Inside you write options like this:
Option = Value
and no cap, the option names don't care about case β Verbose, verbose, VERBOSE? all the same girlie. π
β¨ THE OPTIONS β¨
InstallCmdβ Default:apt-get install
This is the command debfoster runs with a bunch of packages handed to it on the command line. Heads up though: it is not passed to /bin/sh β instead it's invoked like xargs(1) with the packages tacked on as extra options.
RemoveCmdβ Default:apt-get --purge remove
Same vibe as InstallCmd, except this one is for removing packages. π
InfoCmdβ Default:dpkg -s
Also like InstallCmd, but this one gets called with a single package as its argument, and its whole job is to show you info about it.
KeeperFileβ Default:/var/lib/debfoster/keepers
The file where the list of orphans lives. You can literally use this file as a reference when you're setting up a new machine, or even to make identical Debian installs. so useful fr. β¨
DpkgStatusβ Default:/var/lib/dpkg/status
The file where dpkg(8) stores its info about which packages are more or less installed. You can usually leave this value untouched, it's fine.
DpkgAvailableβ Default:/var/lib/dpkg/available
The file where dpkg(8) stores its info about which packages are available. Also usually fine to leave alone.
MaxPriorityβ Default:standard
Any package with a priority greater than this value gets treated as too basic to even ask you questions about. With the default, debfoster will ask about packages with priority standard, optional and extra. And if you use the special value βANYβ, that means every known priority is considered too important to ask about. These are the priority values debfoster knows about (taken from the debian-policy package):
required
important
standard
optional
extra
UseHoldβ Default:yes
Uses the hold attribute from the Status: line. Packages with this attribute will never be upgraded by apt, so it's safe to assume you wanna keep them. π
UseEssentialβ Default:yes
Uses the Essential: line from dpkg(8)'s status file. Most packages marked essential shouldn't be removed anyway, so if you don't want to be bothered about it, turn this on.
UsePreDependsβ Default:yes
When a package pre-depends on another, it needs the other one during installation. This option makes debfoster count those pre-dependencies as ordinary dependencies. If you update your packages a lot, maybe keep an eye out for pre-depended packages that have gone obsolete. π
UseRecommendsβ Default:yes
Recommended packages would normally get installed alongside whatever recommends them in basically all usual setups. This option makes debfoster count those recommendations as real dependencies. Turning it on helps you manage packages that got installed just because something else recommended them.
UseSuggestsβ Default:no
Packages suggested by another package usually enhance the function of the latter, or have some related function that's useful in combination with the suggester. This option makes debfoster count those suggestions as real dependencies. Using it means even fewer questions get asked. π
UseTasksβ Default:no
Makes tasks show up as packages. This makes the tasks you can pick with tasksel(1) appear as packages named task-<label>. debfoster will treat them like normal packages. Tasks can't be removed, but if you mark a task for removal, debfoster will stop asking you questions about it. periodt.
KeepSectionsβ Default:~
Maybe you notice you're always interested in keeping (say) documentation. With this option you can say that packages from a certain section should always be kept. Just give a comma separated list of βpreciousβ sections.
NokeepSectionsβ Default:~
List the sections you're never interested in. For example, βlibsβ is a great candidate, since most libraries debfoster asks about are leftovers from old packages. ποΈ
GuessDependsβ Default: (empty)
Lists name extensions for packages you want grouped with their base packages. Apps often get split into multiple packages with names like "app", "app-doc", "app-dev". If you don't wanna answer questions about "app-doc", just add the "doc" extension to the GuessDepends list.
NegativeKeepersβ Default:yes
Remembers explicit removals of packages. So if a package gets installed that you already explicitly removed before, it gets removed again without asking. Set this to no if you want to be asked anyway. π
Verboseβ Default:no
Using this does the same thing as having -v on the command line. It makes debfoster show which packages have disappeared or have become a dependency.
Forceβ Default:no
This one has the same meaning as the -f command line option. Every orphaned package gets scheduled for removal without asking a single question. π
Quietβ Default:no
Having this option (same meaning as the -q command line argument) in your config file more or less defeats the whole purpose of debfoster β although the KeeperFile does still get kept up-to-date.
π BUGS π
Found something cursed? Send reports to the Debian bug tracking system:
http://bugs.debian.org/debfoster
and include as much info as you can gather β error messages, configuration files, versions of dpkg/apt, whatever might be relevant. A tool like reportbug might come in handy. π«Ά
π SEE ALSO π
apt-get(8), apt-cache(8), dpkg(8), deborphan(1), tasksel(1)
and that's the whole thing bestie, you ate that. π
β¨ this page is from the Debian GNU/Linux distro, dated 2001-06-10, and it's the DEBFOSTER(8) manual page β go be the main character of your package management journey, ily ππ¦π
π¦ where this page comes from
- debian trixie: debfoster 2.8-1 Β· GPL-2.0-only AND LGPL-2.0-only AND LGPL-2.1-only
- ubuntu questing: debfoster 2.8-1
- ubuntu resolute: debfoster 2.8-1build1 Β· GPL-2.0-only AND LGPL-2.0-only AND LGPL-2.1-only
- ubuntu stonking: debfoster 2.8-1build1 Β· GPL-2.0-only AND LGPL-2.0-only AND LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms