Each Linux distribution is a collection of various packages. So, all packages must keep in a suitable package manager.
Different types of package managers are available on every Linux distribution. When we talk about CentOS then, using RPM is a package, and YUM is used as Package Manager.
YUM is available on almost all kinds of RPM-based environments like CentOS, Fedora, OpenSUSE, and RHEL. However, it is used on RHEL and CentOS distributions mostly.
To uninstall a particular package, as well as any packages that depend on it, run the following command as root : yum remove package_name.
Similar to install , remove can take these arguments: package names.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform CentOS related queries.
In this context, we shall look into how you can uninstall a program or package using the yum package manager on CentOS 8.
To make any system-level change in the Linux distribution, you must have sudo command or root privileges. In the CentOS environment, you need to login from a root account or any user who can execute sudo commands.
We will execute all commands we need to run on a command-line tool.
Therefore, open the terminal.
To do that, click on 'Activities' on top left corner and from the sidebar click on the terminal application icon.
Then, learn how to uninstall a package using yum on CentOS 8.
Before uninstalling any program from your system, you need to know either this package is installed on this system or not.
You must have the package name that you want to uninstall from your CentOS 8 system. For this purpose, you need to list all installed packages.
Therefore, by executing the following command you can list all installed packages on your system:
$ yum list installed
For your convenience, you can use less with the above-mentioned command.
$ yum list installed | less
You can filtered the displaying output with the help of following 'grep' command:
$ yum list installed | grep <search_term>
For example, you want to search the gcc package. Just type gcc in the search term as follows:
$ yum list installed | grep gcc
Now, we are assuming that you know about the package name that you want to uninstall.
So, using the following command you can uninstall the required package:
# yum remove <package>
For example, you want to remove a package with the name gcc.x86_64.
Then, you can remove it by using the following command:
# yum remove gcc.x86_64
By executing the same above command using the following structure, you can uninstall multiple packages:
# yum remove <package_1> <package_2>
For example, we want to remove two packages gcc.x86_64 and Firefox. Then, use the command as follows:
# yum remove gcc.x86_64 firefox
Many similar kinds of packages you can install using the group package installation. So, if you don’t want to use it further then, you can also uninstall this group.
# yum remove @"<group_name>"
Let's give you an example, you can install a group 'Development tools' in which different packages related to development like gcc compiler, cmake, git and automake, etc are included.
So, by using just a single command you can uninstall the packages group:
# yum remove @"Development Tools"
Alternatively, you can use the below command that will perform the same operation that we have done in the above command.
# yum group remove "<group_name>"
When you uninstall a package, it will show you a confirmation prompt. So, if you don’t want to view the prompt during the installation then, use the option ‘-y’ with your command.
# yum remove <package_name> -y
However, yum isn't the only one that offers this feature. Using this powerful manager you can perform more tasks.
So, execute the following command to explore more features of Yum package manager:
$ yum --help
This article will guide you on methods to uninstall a #package using #Yum. You need to just type the package name with root privileges. Moreover, we have also seen how to remove a single package, multiple, and group by using the Yum package manager.
apt remove just removes the binaries of a package.
It leaves residue configuration files. apt purge removes everything related to a package including the configuration files.
To uninstall a program in #Linux Mint terminal:
1. Uninstall software in Linux mint from the main menu.
2. Confirm that you want to #remove the package.
3. Open the Software Manager.
4. Search for a program to remove using the software manager.
5. Remove software in Linux #Mint using the software manager.
6. Open Synaptic package manager.