How can I uninstall any program using terminal. For example, how can I uninstall TeamViewer 7 wich is stored in my home folder. I can not see TeamViewer in ubuntu softvare center, so I can not uninstall it that way.
Simple googling might have helped, anyway here is how you can uninstall any package from terminal:
apt-get --purge remove <package>
You should never remove files by hand use
dpkg --purge <package> if you have already removed it with apt plus the files by hand and it thinks it is still configured this should get rid of it.
Source of info and more on this you can find here: linuxquestions