Whenever you uninstall or remove a program/package in Ubuntu, only the binaries are removed but some of the related configuration files remain in your system. They can be anywhere in
/etc or as a hidden file/folder in your home directory.
At certain time and situation you might need to completely remove both the binaries and settings. There are 2 methods to do this in Ubuntu
Run Synaptic by clicking on the
System → Administration → Synaptic Package Manager menu
In Synaptic, search for the program that you want to remove. You can do it by browsing by the categories, or just type the name of the program in the search box. Installed program is marked green.
Once you've found the program, right-click on it or left click on the green icon and select the
Mark for Complete Removal.
The program will be marked red. You can search for other programs to uninstall, and click on the
Apply button once done.
You'll be prompted with summary of the actions Synaptic is going to take. Click on the
Apply button if you agree with the proposed changes.
You'll get this confirmation window once the uninstallation is complete.
To completely remove programs using the command line, you have the following options;
→Completely remove package
sudo dpkg -P foo
foo and config files, but not dependences using
sudo apt-get --purge remove foo
→Remove unused dependencies and config files using
sudo apt-get --purge autoremove
→Remove package and unused dependencies of
foo, and config files using
sudo aptitude purge foo