EPEL Repo Explained: Installation and Usage on Linux

Quick guide to Extra Packages for Enterprise Linux (EPEL) repository: what it is, installation steps, and how to use it on your Linux system.

If you’ve bet for your server needs on RHEL-based distributions such as AlmaLinux, Rocky Linux, Oracle Linux, or CentOS Stream, you must have reached the point where certain software you need is listed as being in the EPEL repository.

So far, so good, but what exactly is it, and why do so many Enterprise Linux users swear by it? In this article, we’ll demystify EPEL, guide you through its installation, and show you how to make the most of it on your Linux system.

Why? It’s simpleโ€”understanding the EPEL repo can unlock a treasure trove of useful, community-maintained software that makes your Linux system even more versatile. So, without further ado, let’s get started.

What is the EPEL Linux Repo?

EPEL, which stands for Extra Packages for Enterprise Linux, is a community-driven repository that provides a wealth of additional software packages (built against RHEL) for Red Hat Enterprise Linux and CentOS Stream.

Of course, it is also widely used among all RHEL-based derivatives, such as AlmaLinux, Rocky Linux, and Oracle Linux.

The repo was born out of a desire shared by many Fedora contributors: they wanted to bring the same software they lovingly crafted for Fedora into the world of Red Hat Enterprise Linux and its derivatives.

Created and maintained by the Fedora Project, EPEL aims to fill the gap by offering packages that arenโ€™t included in the official repositories but are often necessary for everyday use.

In other words, it is the bridge that allows Fedora’s rich collection of packages to thrive in enterprise environments.

How to Install EPEL Repo on Enterprise Linux

However, before we move on to the installation, let’s clarify something important. The version numbers associated with the EPEL repository (like 8 and 9) refer to the major versions of the Enterprise Linux distribution for which the EPEL repository is designed.

  • EPEL 8 is for Enterprise Linux 8 systems (such as CentOS 8, RHEL 8, Alma 8, Rocky 8, and Oracle 8).
  • EPEL 9 is for Enterprise Linux 9 systems (such as CentOS 9, RHEL 9, Alma 9, Rocky 9, and Oracle 9).

That means each version of EPEL is tailored to work with the corresponding version of the Enterprise Linux system. This ensures compatibility with the libraries, software, and dependencies specific to that version.

So, if you try to use EPEL 9 packages on an Enterprise Linux 8 distro, for example, they may not work properly, and there’s a chance of breaking your system.

Using the below command, you can identify which major version of your Enterprise Linux distribution you’re using (e.g., 7, 8, or 9):

cat /etc/os-release | grep VERSION_ID | cut -d '"' -f 2 | cut -d '.' -f 1Code language: Bash (bash)

As a result, the command will output a single number, such as 7, 8, or 9.

Check Enterprise Linux's version.
Check Enterprise Linux’s version.

Now, it’s time to move on to the main topic: adding the EPL repository to your RHEL, CentOS Stream, Rocky, Alma, or Oracle Linux system. The process is straightforward and involves installing a single package named “epel-release.”

The best part is that you don’t need to worry about installing the wrong version of the EPEL repository – your Enterprise Linux system’s “epel-release” packageย is already set up for the right version. However, if you still want to check its meta information, just run the command below and look for the line that says “Version” in the output.

dnf info epel-releaseCode language: Bash (bash)
Check the 'epel-release' package's meta info.
Check the ‘epel-release’ package’s meta info.

The only exception to this package name rule is if you’re using Oracle Linux. For Oracle Linux 8, the package is called “oracle-epel-release-el8,” and for Oracle Linux 9, it’s “oracle-epel-release-el9.”

That’s because Oracle maintains its version of the EPEL repository called “oracle-epel-release,” which is essentially Oracleโ€™s repackaging of the upstream EPEL but tailored specifically for Oracle Linux.

The repackaged version ensures compatibility with Oracle Linux environments and includes any necessary tweaks for Oracle’s kernel, system architecture, and software.

Let’s move on. To install the EPEL repository on your Enterprise Linux system, just run the following:

sudo dnf install epel-releaseCode language: Bash (bash)
Installing EPEL repo on Enterprise Linux distro.
Installing EPEL repo on Enterprise Linux distro.

This will set up the EPEL repository by creating the needed configuration files, such as “/etc/yum.repos.d/epel.repo,” and will automatically enable it. This means you can start installing software from the repository immediately without taking any further action.

To confirm that it is enabled and available, you can list the repositories on your system:

sudo dnf repolistCode language: Bash (bash)
List installed and enabled repos on an Enterprise Linux system.
List installed and enabled repos on an Enterprise Linux system.

Additionally, you can enable the CodeReady Builder (CRB) repository, especially if you intend to build packages. It offers a set of developer tools, libraries, and dependencies that may be needed to compile or run some applications, including those built with the aid of EPEL packages.

Of course, if you have no such plans, it’s perfectly OK not to allow it. However, if you decide to go ahead, the command you’ll need is:

sudo /usr/bin/crb enableCode language: Bash (bash)
Enabling the CRB (CodeReady Builder) repository.
Enabling the CRB (CodeReady Builder) repository.

Working with the EPEL Repository

Installing a package from the EPEL repository is as straightforward as installing any other package on your Enterprise Linux system. Simply run “sudo dnf install [package_name],” and it will automatically be downloaded and installed if the package is available in EPEL. For example:

sudo dnf install htopCode language: Bash (bash)

Perhaps your next question is, “How do I know which packages the EPEL repository contains?” It’s simple! You can easily view the full list of available packages with this command:

dnf repository-packages epel listCode language: Bash (bash)

Furthermore, if you want to list the installed packages on your system only from the EPEL repo, execute:

dnf repository-packages epel list installedCode language: Bash (bash)
A list of EPEL installed packages.
A list of EPEL installed packages.

If, for some reason, you want to disable the EPEL repository without uninstalling it, you can do so by using the following command:

sudo dnf config-manager --set-disabled epelCode language: Bash (bash)

To re-enable it, run:

sudo dnf config-manager --set-enabled epelCode language: Bash (bash)

Lastly, to completely remove the EPEL repository from your system, you can uninstall the “epel-release” package:

sudo dnf remove epel-releaseCode language: Bash (bash)

This will remove the EPEL repository configuration files from your system. Of course, this command won’t uninstall any packages you’ve already installed from this repo. They will remain on your system and continue to work as usual. However, they wonโ€™t get further updates unless you reinstall or re-enable the EPEL repository.

Bottom Line

EPEL is an invaluable resource for extending the functionality of RHEL-based distributions like CentOS Stream, AlmaLinux, Rocky Linux, and Oracle Linux.

With a wide variety of stable, community-maintained packages, it provides software that isn’t included in the base repositories of these enterprise systems, offering users greater flexibility and tool availability.

Additionally, we highly recommend checking out our detailed guide, “DNF Command-Line Package Manager in Linux,” to help you get the most out of EPEL on your Enterprise Linux system.

For more information, visit the official EPEL page on the Fedora Docs website. As always, any suggestions and comments are welcome in the section below.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%