Uninstall or remove a package using terminal on CentOS

It is necessary to remove additional software packages from the system because these packages take up a lot of space and slow down the speed of your system. If certain software or related packages are not underutilized, this is the best way to remove or erase them from the system. For this, he will also create a comfortable working environment. In this article, we will walk through how to remove or remove packages from your CentOS 8.0 system using the terminal.


  1. You must be logged in as root or must have rights to run the Sudo command.
  2. The package managers RPM and YUM / DNF are usually already installed. If not, then install them.

List or find installed packages

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


$yum list | less

Find a specific software or package

To remove a specific package from the system is the best way to find a specific software by its name. Run the following command to find a specific software or package:


$yum list {package-name}

Find the installed RPM package

Using yum to remove software or package from CentOS

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

Make sure yum is installed on your system first. After installing yum, to remove unnecessary software or package from CentOS 8.0, run the following yum command.


$yum remove [package_name]


$yum erase [package_name]

Here we will remove python2 from our system. Enter the following command at the terminal. It will ask you to enter your admin password. Enter your Sudo user / administrator password.

yum remove the package

The Y / N option will be displayed on the terminal, which will confirm that you want to remove that particular package, press y and then Enter to continue and press N and Enter if you don’t want to remove that package.

Finally, the uninstallation process is complete. Here enter the name of the package to be removed from the system. After displaying the output, it will inform you that pythons2 has been removed from your system.

rpm removal complete


In this article, we learned how to remove or remove packages from CentOS 8.0 to free up space occupied by unnecessary programs. You can now also list installed packages and find a specific package or software that you might want to remove. I hope you find this tutorial helpful and you can remove any software or application package from the system on CentOS 8.0.

Uninstall or remove a package using terminal on CentOS

Related Posts