Purging removed packages
Removing old packages is something you—or your package manager—does all the time. That does, however, leave an awful amount of configuration files that should have been purged, right? This simple command will purge removed packages:
# dpkg -l | awk '/^rc/ {print $2}' | xargs dpkg --purge
I cannot remember where I got this command. I am sorry about not giving any credit.
This has been something I have been wondering about for a while. When a system ages there will nessesarily be left quite a few configuration files when old packages are removed. This simple command cleans out old packages for good.
The “debhelper” package is required.
Copyright © 2008 Daniel Aleksandersen 2008-06-17 at 10:06
« Stupid thing to do: Run # cleanlinks | Home | Privacy awareness in Opera »- The easy way to taste the new Pidgin messenger
- Stupid thing to do: Run # cleanlinks
- Supported iTunes Store's DRM free initiative
- Gutsy Gibbon broke my email and more
- Fourteen months until KDE 4 comes to KUbuntu
- Got the notebook, but had to go with openSUSE
- Monday cleaning tasks (Cron jobs)
Get a free subscription to new entries in the Open Source Notebook!
Runbox
- 10 GB email storage,
- 1 GB file storage,
- 100 MB attachment limit,
- your own domain,
...and more! Get your own premium email for just 49 USD per year!
Categories- Communication (24)
- Conquering the Command Line (12)
- Gadgets (13)
- K Desktop Environment (25)
- Multimedia (23)
- Online Privacy (9)
- Open Formats (24)
- Reviews (6)
- Shape of the World (28)
- Software (25)
- Ubuntu and Debian Watch (12)
- User Interface (26)
- Your Rights! (8)
The archive keeps a record of all entries that have ever been published! Have a look back in time, and see what was going on!
LicenseThis blog entry text is licensed under a Creative Commons Sampling Plus 1.0 License. The license explained, and legal notes.

One comment
Now that is a really usefull command! Will have to test it later to night.
Comment by Kent Vegard Evjen (Subscribed) at 2008-06-18 @411.
Leave your comment