Uninstall or remove a package using the terminal on CentOS

s2 0

It is necessary to uninstall the additional software packages from the system as these packages take up a lot of space and slow down the speed of your system. Unless certain software or related packages are underutilized, this is the best way to remove or delete them from the system. A pleasant working environment is also created. In this article you will learn how to remove or uninstall packages from your CentOS 8.0 system using the terminal.


  1. You should log in as a root user or must have permissions to run the sudo command.
  2. The package managers RPM and YUM / DNF are usually already installed. If not, install it.

List or find installed packages

To remove an additional package, list all installed packages on the system. Open a terminal window and run the following command for a list of all installed software or packages.


$yum list | less

Look for a specific software or package

In order to remove a specific package from the system, the best thing to do is to search specific software by its name. To find a specific software or package, run the following command:


$yum list {package-name}

Using yum to uninstall a software or package from CentOS

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

First, make sure yum is installed on your system. After yum is installed, run the following yum command to remove unnecessary software or packages from CentOS 8.0.


$yum remove [package_name]


$yum erase [package_name]

Here we are going to remove Python2 from our system. Enter the following command at the terminal. It will ask you for the admin password. Enter the password of the sudo user / administrator.

yum remove package

You will see an option of Y / N on the terminal confirming that you either want to remove this particular package, press y then press Enter to continue and press N and Enter if you do not want to remove that package.

Finally, the uninstallation process is complete. The name of the package that you have to remove from the system type here. After viewing the output, you will be notified that Pythons2 has been removed from your system.

RPM uninstallation completedadvertising


In this article, we learned how to uninstall or remove packages from CentOS 8.0 in order to free up space occupied by unnecessary programs. Now you can also list installed packages and find a specific package or software that you might want to delete. Hope this tutorial is helpful to you and you can remove or delete any software or application package from the system under CentOS 8.0.

Uninstall or remove a package using the terminal on CentOS