In Linux like Ubuntu OpenSUSE and even another version, you can install and uninstall software (also called packages) by different methods. In all Ubuntu distributions, we have the Ubuntu Software Center, which can install and uninstall programs.
What if we have an installed software that is not listed in Ubuntu Software Center, how can we uninstall it?
Also if you used Ubuntu software repositories from Ubuntu Software Center to install a software you can use the Ubuntu Software Center to uninstall that software as well. However, sometimes there can be software installed manually that do not appear in Ubuntu Software Center, or something can happen that Ubuntu Software Center will not detect the installed software. So if you are more comfortable using the command line, we will show you an easy way to see what’s installed on your system and uninstall programs.
If you know the software name that you want to uninstall, you can search it with the “dpkg” command. To use it you have to open the terminal from Menu, or by pressing “Ctrl + Alt + T” and use the “dpkg” command.
This command will show you the list of all software packages installed, search from the list the package short name that you want to uninstall.
To uninstall a program, you have to use the “apt-get” command, which is the general command for installing or uninstalling programs and manipulating installed programs. To uninstall and delete all the configuration files you will have to use the “–purge” command together with apt-get.
In our example we will uninstall the GIMP software, Use the following command:
sudo apt-get –purge remove gimp
In some cases, you will have to enter your Root password.
When the uninstallation is done you can exit the terminal by typing “exit” or by just simple closing it.
Remember, if you If you want to keep the configuration files, you will not have to use the “–purge” command, as shown in the following command, foe example:
sudo apt-get remove gimp
Also, there can be programs installed in Linux that depends on other packages, so when you uninstall a program it will leave a tail of another unused package. To remove any unused packages you can use the “autoremove” command, see the example:
sudo apt-get autoremove