Have you ever used your terminal to uninstall your programs in your ubuntu machine? It is not that hard! Terminal is real power and you need to learn it. Practise, practise and practise and one day you will feel the joy of using the terminal for almost everything. Now let me introduce you guys to my simple problem.
I have installed teamviewer 8 from a deb package and i am not using it anymore, so i decided to uninstall this software, but i want to do it from terminal since i love it and makes me understand how things work from a low level. But, the question is, how? Do you know what a deb package is? Since is very important to know what a deb package is i am explaining it to you in two or three short sentences.
A deb package is an archive which contains two tar archives . These archives may be compressed with gzip (zlib), Bzip2, lzma, or xz programs and the deb package is handled by dpkg or other programs such as apt/aptitude, the Ubuntu Software Center, Synaptic or Gdebi. So, when i installed teamviwer i installed the deb package of it.
"Debian packages can be converted into other packages and vice versa using alien, and created from source code using CheckInstall or Debian Package Maker." (Wikipedia)
I thnink you guys understand now that to remove teamviwer 8 from my ubuntu machine i have to remove the the package with its configuration files. What if you don not remember the exact name of the package you want to remove? Don't worry! The Tab will help you to autocomplete the name of the package.
Find the package name with dpkg
I use dpkg -l | grep -i teamviewer command to find the package name of teamviewer. You can see it on Figures.
Remove the package from terminal
Use apt-get purge package_name to remove the package with its configuration files.
I showed you how to use apt-get purge package_name for removing my teamviwer package, but you can use it to remove any package you like.