Purging Configuration Files

Hi folks.

This is just a tip for clean up your Kubuntu (Debian Like) system.

The scenary: You installed a program (or any package) with Kpackagekit, and now you don’t want this program anymore so, you go on Kpackagekit and remove it. Simple and fast.

The problem: When you remove a program using the actual Kpackagekit, it’s remove “only” the program package with his man pages and other things. What it doesn’t remove is the configuration files about this program installed, and this configs files “eat” some disk space.

The solution: There are two useful ways to Kubuntu users “purge” this configuration files:

1- Later that you remove something using the Kpackagekit, run at your terminal:

$ dpkg --list | grep '^rc\b' | awk '{ print $2 }' | xargs sudo dpkg -P

2- Remove the program using the terminal:

$ sudo apt-get purge packageName

and later remove the dependencies (configuration files included) with:

$ sudo apt-get autoremove --purge

This function to remove the configuration files would be a great new feature to KpackageKit.

*The Moun (QApt) package manager already has this feature.

*If you use Ubuntu (with Gnome) the Synaptic already remove the configuration files, is just remove with the option “Mark to complete removel”, or, you can use the Ubuntu-Tweak to do that.

This command line tip was found here.

Advertisements