It is necessary to uninstall the extra software packages from the system because these packages take a lot of space and slow down the speed of your system. If specific software or related packages are not underused then it is the best way to remove or erase it from the system. To do so, It will also create a comfortable working environment. In this article, we will explore how to remove or uninstall packages from your system CentOS 8.0 using the terminal.

Pre-requisites

  1. You should be login from a root user or must have privileges to run the Sudo command.
  2. The RPM and YUM/DNF package managers are normally already installed. If not then install them.

List down or find installed packages

To remove an extra package, list down all installed packages of the system. Open a terminal window and run the following command to get a list of all installed software or packages.

Syntax

$yum list | less

Uninstall or remove a package using the terminal on CentOS centos linux shell

Find a specific software or package

To remove a specific package from the system, it is the best way to search a particular software with its name. Run the following command to find a specific software or package:

Syntax

$yum list {package-name}

Uninstall or remove a package using the terminal on CentOS centos linux shell

Using yum to uninstall a software or package from CentOS

CentOS is an RHEL (Red Hat Enterprise Linux) distribution. In CentOS 8.0, most of the user’s commands are based on YUM (The Yellowdog Updater, Modified) and on the RPM (Red-hat Package Manager) package manager. You can install or remove a package or software by using the yum command.

First, make sure that yum is installed on your system. Once the yum has been installed then to remove unnecessary software or package from CentOS 8.0, run the following yum command.

Syntax

$yum remove [package_name]

OR

$yum erase [package_name]

Here, we will remove python2 from our system. Type the following command on the terminal. It will ask you for the admin password. Type password of Sudo user/admin.

Uninstall or remove a package using the terminal on CentOS centos linux shell

An option of Y/N will be displayed on the terminal that will confirm either you want to remove this particular package press y and then Enter to further proceed and press N and Enter if you do not want to remove this package.

Finally, the uninstallation process has been completed. The name of the package that you have to remove from the system type here. After displaying the output, it will inform you that pythons2 has been removed from your system.

Uninstall or remove a package using the terminal on CentOS centos linux shell

Conclusion

In this article, we have learned how to uninstall or remove packages from CentOS 8.0 to free up space occupied by unneeded programs. Now, you are also able to list installed packages and find a particular package or software that you may want to delete. I hope, this tutorial is helpful for you and you can remove or erase any software or application package from the system on CentOS 8.0.