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 1
Code language: Bash (bash)
As a result, the command will output a single number, such as 7, 8, or 9.
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-release
Code language: Bash (bash)
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-release
Code language: Bash (bash)
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 repolist
Code language: Bash (bash)
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 enable
Code language: Bash (bash)
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 htop
Code 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 list
Code 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 installed
Code language: Bash (bash)
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 epel
Code language: Bash (bash)
To re-enable it, run:
sudo dnf config-manager --set-enabled epel
Code language: Bash (bash)
Lastly, to completely remove the EPEL repository from your system, you can uninstall the “epel-release” package:
sudo dnf remove epel-release
Code 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.