What's new

Welcome to Ruzgar.com

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask questions and get answers from our community


Answer questions and become an expert on your topic

Contact us

Contact the site administrator directly.


Just like Facebook join them and enjoy.

Centos Lesson 10 YUM, RPM Software Installation and Package Management


Staff member
Oct 3, 2021
Reaction score
On Linux, applications are installed as packages, as on Mac and Windows. On CentOS, package installations are done with the Yum tool. The Yum tool provides ease of use. Because when installing the packages, the package is already defined which file will be taken from where and how and where it will be written. If other components are required for installation, Yum finds them, downloads them and installs them for us. Yum uses Red HAt, CentOS and Fedora. Yum is generally used as follows:

yum [setting] [command] [package]

Yum Commands:

  • install: The specified package is installed.
  • update: Updates all yum packages or the specified package. IT IS USED VERY FREQUENTLY.
  • check-update: Checks for updates.
  • list: Lists information about the package.
  • remove: Deletes the specified package
  • erease: Deletes the specified package
  • clean: Deletes the history of the Yum tool. It is recommended to run it after Yum installation.
  • search: Searches for packages or content.
Yum Package Repositories

Yum's package repositories are in the yum.conf file under the /etc directory. An RPM repository on the Internet can be added here manually. Alternatively, it can be added to the /etc/yum.repos.d/ directory. Repositories with .repo extension can be added here.

To view the repositories installed in our Yum

We can use the
yum repolist
command. This will bring us the installed repositories on our system as follows. Note there is no longer any need to install the Rpmforge repository on Centos. On CentOS's official site it says that the Rpmforge repository is no longer needed and this repository is dead.

rpn repolist.png

Package search with yum:

We can search for packages with Yum. For this, we use the code
yum search packagename
. For example, let's do a search for ffmpeg packages. As a result, it will give us the following summary information.

yum search ffmpeg.png

Here you can select the package you want to install and install it with the yum install packagename command.

We use the following code to view the packages installed on the system:

The screen output will be as follows if there is a package:

yum list installed packages.png

If we want to get information about this installed package, we use the following code:

yum info ffmpeg.x86_64
the result will be as follows:

yum info.png
Normally packages are installed as yum install package name. If the package is somehow corrupted

It can be reinstalled as
yum reinstall packagename
. System updates are made as
yum update packagename

If you want to remove the installed package from the system:

You can remove
 as yum remove packagename
. Sometimes you'll also see codes with -y . These codes do not ask me, it means I approve (yes).

If you want to update the system without asking questions:

yum -y update
If the following screen appears as a result, your system is already up to date. Otherwise, yum will update automatically.

yum update.png

RPM Red Hat Package Management

On Centos, packages are not installed with yum alone. Many packages are installed as rpm. In general, the RPM parameters are as follows:

-i [rpm file] : Install any RPM package.
-U[rpm file] : Updates the RPM package.
-v: It is provided to inform the user while the operations are being performed.
-h: The # character displays the system's progress. (like installation animation)
-e [rpmpackage]: Deletes the installed RPM package.
-e --nodeps [rpmpackage]: Removes the package and its dependencies without warning without warning.
-qa : Lists all RPM packages installed on the system
-qa -- last: Lists the last installed packages on the system.
-qi [rpm_pack] Shows the information of the package
-qpR [rpm_file] or -qR : Lists the dependencies of an RPM package or file.

RPM Package Search:

You can make RPN packages on CentOS's own site. For example, RPM packages are available for Centos 8 at http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os/Packages/. For installation, the link is copied and the file is pulled and installed with the WGET command.

Let's do an example setup:

Let's say we want to install Phyton 3 magic.

RPM kurulumu.png

Right click on the file and copy the link.

We download the file to the server with the command
wget http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os/Packages/python3-magic-5.33-8.el8.noarch.rpm
. We write the following code to install the downloaded package on the system:
rpm -ivh python3-magic-5.33-8.el8.noarch.rpm

After installation you can search rpm -qa python3-magic to see if the package is installed.

If you want to update the package you installed:

We use the code
rpm -Uvh python3-magic-5.33-8.el8

We don't like the package and want to delete it. In this case, the following codes can remove the RPM package from the system:

rpm -e python3-magic-5.33-8.el8
Last edited: