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 »

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




Related entries Stay informed

Get a free subscription to new entries in the Open Source Notebook!

News feed icon Navigation

Runbox Runbox logo
  • 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 Archives

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!

License

This blog entry text is licensed under a Creative Commons Sampling Plus 1.0 License. The license explained, and legal notes.

Creative Commons Sampling+


Copyright © 2006–2008 Daniel Aleksandersen | Legal, license and trademarks | Privacy policy