Use YUM and RPM Package Managers on AlmaLinux 8

In this section of the Linux Tutorials, we want to teach you How To Use YUM and RPM Package Managers on AlmaLinux 8.

YUM and RPM are package management tools for installing, updating, removing, and managing software packages in the RedHat-based Linux system.

In this article about the Differences between YUM and DNF package managers, we discuss why using DNF on Centos 8 and AlmaLinux 8 is better. still, you may want to use YUM so stay with us for the rest of the article.

How to Use YUM and RPM Package Managers on AlmaLinux 8

You need to log in to your server as a non-root user with sudo privileges to execute the root commands. you can check our article about the Initial server setup with AlmaLinux 8.

Now we start to teach you how to use YUM and RPM on AlmaLinux 8.

Note: You can use this guide for Centos 8 and some RedHat-based Linux systems.

How To Enable Epel-repository on AlmaLinux 8

The EPEL repository is an additional package repository that provides easy access to install packages for commonly used software.

You can install the Epel-repository on AlmaLinux 8 with the following command:

sudo yum install

Accept the installation with ‘Y’ or you can use the ‘-y’ option for the yum package manager on AlmaLinux 8 in your command to answer yes.

Your output should similar to this:

Last metadata expiration check: 1:38:32 ago on Wed 08 Sep 2021 12:35:34 AM EDT.
epel-release-latest-8.noarch.rpm 34 kB/s | 23 kB 00:00
Dependencies resolved.
Package Architecture Version Repository Size
epel-release noarch 8-11.el8 @commandline 23 k
Transaction Summary
Install 1 Package
Total size: 23 k
Installed size: 35 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : epel-release-8-11.el8.noarch 1/1
Running scriptlet: epel-release-8-11.el8.noarch 1/1
Verifying : epel-release-8-11.el8.noarch 1/1

Yum Package Manager

Here you can list current repositories on AlmaLinux 8 with the following command:

sudo yum repolist

In your output you will see:

repo id repo name
appstream AlmaLinux 8 - AppStream
baseos AlmaLinux 8 - BaseOS
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
extras AlmaLinux 8 - Extras

There are many available options and commands to use with the YUM package manager on AlmaLinux 8. Let’s check them.

How to Use YUM package manager on AlmaLinux 8

You can easily use YUM on AlmaLinux 8 at the command line in this form:

yum -option command

Here are some useful commands for the YUM package manager on AlmaLinux 8:

  1. yum-install: It will install the specified packages.
  2. yum-remove: Removes the specified packages.
  3. yum-search: This will search metadata for keywords.
  4. yum-info: It lists the descriptions.
  5. yum-update: With this command, you can update the packages to the latest version.
  6. yum-repolist: As you saw in the previous part, it will list the current repositories.
  7. yum-history: This shows what has happened in past transactions.

For example:

yum history
ID | Command line | Date and time | Action(s) | Altered
6 | install https://dl.fedora | 2021-09-08 02:14 | Install | 1
5 | install httpd | 2021-09-07 02:12 | Install | 9
4 | update | 2021-09-07 02:08 | E, I, U | 68
3 | update -y | 2021-06-25 07:06 | I, U | 273 EE
2 | update -y | 2021-03-30 23:47 | I, U | 7 EE
1 | | 2021-03-30 23:00 | Install | 494 EE

This will brings you some useful information about what you did.

Here are some useful options for the YUM package manager on AlmaLinux 8:

  1. -C: Runs from the system cache.
  2. –security: Includes packages that provide a fix for security.
  3. -y: Answers yes to questions.
  4. –skip-broken: Skips packages causing problems.
  5. -v: It uses for verbose.

For example:

yum install -y nginx

This will answer yes to all questions and completes your installation.

For more information and options in detail you can use this command:

man yum

Let’s see how the RPM package manager works.

How to Use RPM on AlmaLinux 8

The form of using RPM is like this:

rpm mode package-file

RPM package manager on AlmaLinux 8 has some basic modes like verify, install, upgrade and etc.

RPM Package Manager

Here are some useful modes for RPM package manager on AlmaLinux 8:

  1. -i: It will install a package.
  2. -U: This upgrades a package.
  3. -e: Erases a package.
  4. -V: This mode verifies a package.
  5. -q: Queries a package.

Here are some useful options for RPM package manager on AlmaLinux 8:

  1. -?|–help: This will print help.
  2. –version: This will print the version number.
  3. -v: Prints verbose output.

For example:

rpm -qa nginx

Here option “a” queries all installed packages on the system.

You can erase the package like:

rpm -evh nginx

-h option is for the hash that shows the # as a progress bar for the operation.

Also, you can use this command for more details about the RPM package manager on AlmaLinux 8:

man rpm


At this point, you learn how to use YUM and RPM package managers on AlmaLinux 8. Also, you get familiar with their commands and options.

Hope you enjoy it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay informed and not overwhelmed, subscribe now!