If you don’t know how to uninstall a program in Linux, we are going to help you out. Maybe a program is causing an error or you just want some free space on your PC. One way or another, one should know how to remove a program in
However, one thing we should know about Linux is that there are not just one way to uninstall (or install, for that matter) packages. It will differ depending on the version we are using.
Systems and package managers
The first thing we need to know when it comes to uninstalling a program in Linux is:
- what is a package system?
- what is a package manager?
- what system and package manager does my Linux use?
A package system is a specific format in which software is packaged, distributed, and installed on our system. The package manager is, of course, the program responsible for installing, updating, and uninstalling the software.
Thus, different ‘families’ of distributions share the package system (and tend to share the manager as well); thus, those based on Debian (like Ubuntu and derivatives) have apt as format and apt-get as manager, those based on RedHat (like CentOS, Fedora, and derivatives) have rpm as format and usually have yum as manager (although Fedora uses a ‘fork’ called dnf), and those based on Arch (like Manjaro) use the tar format and the pacman manager.
How to uninstall a program in Linux?
All popular Linux distributions have some graphical tools capable of helping us to use the package manager without the need to enter commands in text mode. In fact, one of these tools is usually installed as standard, but there are also alternative options.
For example, in Ubuntu, we have the ‘Software Center’, which allows us to manage both APT and Snap packages, but we also have the option of installing Synaptic, the traditional graphical package management tool of Debian and all its derivatives (and which only manages APT packages).
The name and the exact operation of these graphical managers differ from one distribution to another.
Let’s say Synaptic graphical manager is running on Ubuntu. We just have to use its internal search engine to find the package we want to uninstall and tell Synaptic to uninstall it.
How to uninstall a program on Debian and Ubuntu?
If we use Debian, Ubuntu, Linux Mint, Elementary Linux, Kali Linux, PopOS! or similar, we will only have to enter the following command in the terminal (and then enter our ‘root’ password):
sudo apt-get remove [package-name]
How to uninstall a program on Red Hat?
If we are using Red Hat or CentOS, we only need to enter the following command in the terminal (and then enter our ‘root’ password):
sudo yum remove [packagename]
If, on the other hand, we use Fedora Linux:
sudo dnf remove [packagename]
How to uninstall a program on Arch Linux?
We will only have to enter the following command in the terminal (and then enter our ‘root’ password):
sudo pacman -Rs [packagename]