Linux doesn’t have the registry hell of Windows. For most users, that’s a major benefit: one less incredibly-delicate, constantly-modified central database to be concerned over. The downside is that uninstallation of software and utilities requires either a helpful installer utility or careful combing through of your user files. Many programs do have uninstallation routines or utilities, especially those installed through package managers like apt-get, but others require a manual removal of leftover files after uninstalling the software.
As long-time users of Linux know, there’s not much need to “warn” the operating system about removing files. Everything on the hard drive is a file of equal merit. As a result, removing a “program” is really just removing a collection of files that work together. Ideally, an uninstaller would take care of those for you, but not every program is so well-managed.
Uninstalling Programs with a Package Manager
Whenever possible, remove the application package using the package manager you used to install it. For example, if you installed the application in Ubuntu Software or Gnome Software, you can uninstall the software from the same place.
You can also look at the INSTALL or README files for the packages you have installed. You can find these with the primary binaries of the package.
Synaptic is a GUI package manager for Debian-based Linux applications. It has more capable removal tools available than the default package management applications.
Install Synaptic through Ubuntu Software or apt-get:
sudo apt-get install synaptic
Once installed, launch Synaptic to view all installed packages. It marks packages currently installed with a green square. You can also filter for installed applications, only using the sidebar.
To completely remove an application, right-click its installed package and choose “Mark for Complete Removal” from the context menu.
This marks the files for deletion. To remove the files, click “Apply” or press Ctrl + P on your keyboard.
If you installed the software with
apt-get, remove it with
apt-get. This will include the same packages as those found in Synaptic. But considering the slight possibility of variance between apt-get and Synaptic, you may prefer to remove your software with the same package manager that installed it. This will always ensure a complete deletion.
To remove a package and all associated files from your system, execute the following command:
sudo apt-get purge package-name
package-name with the name of the package you wish to remove. In our example, we’re removing wireshark.
Once the package is found, type “Y” and then press “Enter” to confirm the package’s removal.
purge command will remove the application as well as its configuration files. It does not remove the application’s dependencies though. To remove any remaining dependencies that were automatically downloaded with the original package, run the following command:
sudo apt-get autoremove
This will remove all unnecessary dependencies, including any orphaned by removing their parent package.
If your Linux distro uses yum instead of apt-get, use this command:
sudo yum remove package-name
package-name with the name of the package you wish to remove. To uninstall multiple packages, list them after the remove command.
sudo yum remove wireshark tmux unzip
If you installed packages using yum’s Groups functionality, you’ll need to remove them as a group.
sudo yum remove @"Group Name"
Replace with the appropriate group name to remove all repositories associated with that group. The @ sign specifies a group, and the quotes are used to capture the space in the name of the group. If the name has no space, quotes are not strictly necessary.
Manually Removing User Configuration Files
After uninstallation, you may want to manually scan the following directories for the user config and residual files:
~/ means the Home folder, and “~/.local” is a hidden folder (named .local) in the Home folder. You will need to press Ctrl + H to view the hidden files/folders in your File manager.
User config files are usually stored in their application-specific folder, so you can easily spot them by their folder’s name.
You’ll also want to look for package-specific files that share the package name. For example, the KDE uses “~/.kde” to store user configuration files.
The best and easiest way to remove applications on Linux is with the package manager that installed the applications. Since package managers install the vast majority of software on most Linux platforms, simply using your package manager to remove it covers an enormous variety of circumstances. However, in most cases, your user config files will still be untouched in the Home folder, so it is best for you to go through the “~/.local” folder to make sure all residual files are removed.
Our latest tutorials delivered straight to your inbox