All software

Remove / Purge Debian Packages Scripts

Two tiny Perl scripts around dpkg and apt-get: remove every package matching a keyword, and purge the leftovers.

PerlLinux

A set of two tiny perl scripts for easy debian package removal (they depend on apt-get).

  • clear-by-name — clears all the packages that have the specified keyword. Usage: ./clear-by-name.pl <keyword>
  • clear-rc — purges all the remaining packages. Usage: ./clear-rc.pl

What they do

clear-by-name.pl runs dpkg -l, keeps the lines that contain the keyword, and for every installed package on one of them runs apt-get remove -y -f. clear-rc.pl looks for the rc lines instead, the packages that were removed but left their configuration files behind, and runs dpkg --purge on each. Both need root, and both are exactly the shell one-liner you would type, wrapped so that you do not have to remember it.

Where it stops

The keyword is matched against the whole dpkg -l line, description included, and -y means apt-get will not ask. So clear-by-name.pl lib will try to take a great deal with it. Run dpkg -l | grep <keyword> first and read the list; the script will not.

One of the small utilities (2002–2007); the others are listed there, each with a page like this one.

Downloads

These are the original files, kept as they were published. Most are decades old and are here as a record rather than as working software.