Clean up After Apps
1 Remove configuration files
Normally, when you remove an application using apt-get remove any configuration files stored in the /etc directory are kept in case you later wish to reinstall it. To remove these along with the package, issue the following command instead (substitute
$ sudo apt-get purge
2 Remove obsolete packages
When you remove packages from the Terminal, you’ll often be prompted to clean out related packages (typically dependencies) that aren’t being used elsewhere. To do this, use: sudo apt-get autoremove . Check all the packages being removed – some may be required for apps installed manually rather than through apt-get or your package managers.
3 Protect individual dependencies
If there’s a package you want to keep, cancel the operation (press N), then type this, substituting
4 Clear more disk space
When you download package files for installation they remain on your PC. One way to keep them from taking up unnecessary space on your hard drive is to periodically issue the following command:
$ sudo apt-get autoclean
This removes all but the latest version of installer packages.