How to Install EPEL Repository in RHEL 9 Linux

Installing the EPEL repository is one of the most recommended steps after you install RHEL 9. To make things easy for you, we are not just going to show you installation steps but rather we are going to explain what is EPEL, what makes it so special, and how you can use EPEL to install packages.

So let’s start with a brief introduction to EPEL.

What is EPEL Repository?

EPEL stands for Extra Packages for Enterprise Linux which is created and maintained by Fedora Special Interest Group. This repository is known for bringing a high-quality set of additional packages for Enterprise Linux which also includes RHEL 9.

The specialty of EPEL is that it is based on Fedora counterparts so it is never going to conflict with or replace any packages in your Enterprise Linux distribution.

The major reason why it is so popular is the set of features it is bundled with.

  • EPEL enables you access to numerous amounts free of packages.
  • Being managed by the Fedora group, it is 100% open-source and secure.
  • Never conflicts or replaces existing packages as it uses Fedora counterparts at its core.
  • You are assured of getting only high-quality and enterprise-grade packages.

Install EPEL Repository in RHEL 9

Once we are done with the introductory part, it’s time to install the EPEL repository in our RHEL 9 system. So let’s start with our first step.

Step 1: Updating RHEL 9 Repositories

As every command which we are going to demonstrate is going to use elevated privileges, we are going to switch to the root user by the following command:

$ sudo -i

Now, let’s update repository indexes and update the packages (if any) by the following command:

# dnf update -y
Update RHEL 9 Repositories
Update RHEL 9 Repositories

Step 2: Add EPEL Repository to RHEL 9

Once we are done updating repositories, it’s time to install the EPEL repository. For that, we have to enable codeready builder repository for our RHEL system by utilizing the given command:

# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
Add Codeready Builder Repo
Add Codeready Builder Repo

After enabling the codeready repository, let’s install the EPEL repository by the following command:

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
Install EPEL in RHEL 9
Install EPEL in RHEL 9

After installing EPEL, let’s cross-check the whole process by listing all the repositories in our system.

# yum repolist
Check EPEL in RHEL 9
Check EPEL in RHEL 9

You can see that our installed EPEL Repository has been listed which means we have successfully installed the EPEL repository in our system.

Step 3: Installing Packages Using EPEL in RHEL 9

This section will demonstrate how you can list available packages in EPEL, search for individual packages from the EPEL repository and install the required package.

So let’s start with how you can list the available packages in the EPEL repository by the following command:

# dnf --disablerepo="*" --enablerepo="epel" list available
List Packages from EPEL
List Packages from EPEL

But if you are looking for a specific package, you can easily search by using the grep command. For example, if we are looking for neofetch, we are required to use the following command:

# yum --disablerepo="*" --enablerepo="epel" list available | grep 'neofetch'
List Package from EPEL
List Package from EPEL

As you can clearly see, the neofetch package is available named “neofetch.noarch”. But if you want more details about neofetch.noarch, we can easily extract details about it by utilizing the given command:

# yum --enablerepo=epel info neofetch.noarch
List Package Info
List Package Info

You can clearly see, that it gets us a detailed description of the package which is really helpful for identifying the package which we are looking for.

To install the intended package, we will be utilizing the following command:

# yum --enablerepo=epel install neofetch.noarch -y
Install Package from EPEL
Install Package from EPEL

You can clearly see, that neofetch is working as well as we intended.

Check RHEL 9 Info
Check RHEL 9 Info

This guide was intended to explain how you can easily install the EPEL repository, search for packages and install them.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.