How to Completely Remove a Package From Ubuntu With Configurations

| Comments

Simple question… If you wanted to remove a Software from a Debian based system like Ubuntu or Linux Mint, what will you do? Go to Synaptic, right-click and Mark for Removal? Or, use apt-get remove? Do you think they will remove the whole package using these two methods? Think again…

In Windows, we use special software uninstallers to get rid of the whole software without leaving any trace. Windows doesn’t have a special feature to remove them completely. If the uninstaller provided by the software decide to leave some junk, we have to live with them. In Linux also, if you use the above mentioned methods, some packages will leave some traces. So, you have to live with them. If you want to re-install the package to reset its settings, you’ll find that the old settings are still there! That’s because many packages won’t remove their configuration files when you do a normal removal. But unlike Windows, Linux have an option to do a complete removal. Lets see how to do it using both the command line and the Synaptic Package manager…

From the Command Line :

  • If you are using apt-get to remove the packages from the command line. You might be using apt-get remove. This command will leave the configuration files behind. To remove them completely, use apt-get purge. For example, if you need to remove a package named Skype, do it like this :
sudo apt-get purge skype

Note : There’s another command for this : apt-get –purge remove. This command and the command I gave you both does the same thing. This is the old method. Later, apt added the purge command but didn’t remove support for this old command because it’s already widely used by many people. (Special thanks for Zoredache for pointing it out)

Through Synaptic Package Manager :

  • When you are normally removing a package from Synaptic, you will simply right-click and select Mark for Removal right? But if you need to remove the app completely, select Mark for Complete Removal. Actually, its quit clear in Synaptic than in apt-get. I think you might have figured it out already…

Completely Remove a Package Completely Remove a Package

Next time, remove the package completely without leaving any trace! So, you’ll have a clean machine. Enjoy!