Uninstall program by terminal

71,284

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

Share:
71,284
Sasa
Author by

Sasa

Updated on September 18, 2022

Comments

  • Sasa
    Sasa over 1 year

    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.

    • Admin
      Admin about 11 years
      If you install TeamViewer 7 using the .deb, you should be able to find it by running dpkg -l | grep -i teamviewer then use dpkg -r or apt-get purge package_name to remove the package with its configuration files.
    • Admin
      Admin about 11 years
      Also, if you ever need to remove/purge a package, but you don't remember its exact name but the beginning of it, you can press Tab one (or two if there are more options) time(s) to autocomplete what you are typing. For instance, I want to remove Google Chrome: I type sudo apt-get --purge remove goog and I press the Tab key two times; the terminal will show me this: google-chrome-unstable, google-talkplugin, google-musicmanager, goograndom-app and so on. In this way I can know what packages start with google. In case I only have google-chrome-unstable, a single Tab will do.