Cleaning Up Old Configs On Ubuntu / Debian

Image via Wikipedia

This is more for my own use than anyone else…

If you remove a package in Debian / Ubuntu you often end up with legacy configuration files lying around.

Running the following command removes all the crud left lying around your system and may fix silly issues that you run into. As it’s Linux, there’s probably about 10 other ways to do this!

Here’s the command:

sudo aptitude purge `dpkg –get-selections | grep deinstall | awk ‘{print $1}’`

Enjoy!

By Michele Neylon

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version