EPEL (Extra Packages for Enterprise Linux) is a Fedora Project initiative that provides additional, high-quality packages for Rocky Linux, Alma Linux, CentOS Stream, and Red Hat Enterprise Linux (RHEL). EPEL does not replace base distribution packages; it adds software not in the default repos.
For Rocky Linux or Alma Linux 8 (and CentOS 8), see How to install and enable EPEL repository on Rocky Linux/CentOS 8.
EPEL Next is built against CentOS Stream (EPEL is built against RHEL). EPEL Next is a subset of packages rebuilt for Stream and is used on top of the regular EPEL repo. This guide shows how to install and enable EPEL and EPEL Next on Rocky Linux 9 and Alma Linux 9 (and other RHEL 9–compatible distros).
In this guide you’ll:
- Update the system and enable the CodeReady Builder (CRB) repository
- Install EPEL and EPEL Next using the official Fedora RPMs for EL9
- Verify with
dnf repolistand use common dnf commands for EPEL (search, info, check-update, upgrade)
Update and refresh your system
Before we proceed, ensure that you have the latest packages installed. This step ensures compatibility and optimizes the system for the new additions. Execute the following command to achieve this:
| |
This command will refresh the package repository information and upgrade all the packages on your system to their latest versions.
Integrate EPEL
Enable the CodeReady Builder repository (CRB)
This repository contains additional packages that complement the main distribution and enhance its capabilities. To enable CRB, execute:
| |
Install EPEL and EPEL Next:
With the CRB enabled, proceed to install the EPEL repositories tailored for Rocky Linux 9 using the following command:
| |
Remember to type y when prompted to confirm installation.
Verify EPEL and EPEL Next Installation
Once the EPEL repository is successfully integrated into your Rocky Linux or Alma Linux system, validate that it is set up correctly. This ensures the repository has been correctly configured and ready for use. To achieve this, the dnf repolist command serves as an efficient tool.
Execute the following command:
| |
If all went as expected, you should see an output similar to this
| |
Basic usage of EPEL
These are common use cases and commands when working with the EPEL repository:
Searching for Specific Packages
If you’re unsure about the exact name of a package but have a general idea, you can use the dnf search command:
| |
Replace keyword with a term related to the package you’re looking for. This will return a list of packages that match or are related to the keyword.
Getting Detailed Information
To get detailed information about a specific package, including its description, version, and dependencies:
| |
Checking for Package Updates in EPEL
To see if there are updates available for packages you’ve installed from EPEL:
| |
This will list all packages from EPEL that have updates available.
Removing a Package
If you’ve installed a package from EPEL and wish to remove it:
| |
Replace package_name with the name of the package you want to uninstall.
Disabling EPEL Temporarily
There might be times when you want to install or update packages without considering the EPEL repository. To temporarily disable EPEL during a DNF operation:
| |
Replace command with the DNF command you wish to execute.
Keeping EPEL Packages Updated
To ensure that all packages you’ve installed from EPEL are updated:
| |
This will upgrade all EPEL packages to their latest versions.
Frequently Asked Questions (FAQ)
What is EPEL?
EPEL (Extra Packages for Enterprise Linux) is a Fedora Project repository that provides additional packages for RHEL and compatible distributions (Rocky Linux, Alma Linux, CentOS Stream). Packages are built to work alongside—not replace—base distribution packages and are based on Fedora packages.
What is EPEL Next?
EPEL Next is built against CentOS Stream rather than RHEL. It is a subset of EPEL (only packages that need rebuilding for Stream) and is intended to be used together with the regular EPEL repo on Stream-based systems.
How do I install EPEL on Rocky Linux 9 or Alma Linux 9?
Enable the CodeReady Builder (CRB) repo with sudo dnf config-manager --set-enabled crb, then install the EPEL and EPEL Next release RPMs: sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm. Verify with dnf repolist | grep epel.
What is the CodeReady Builder (CRB) repository?
CRB (CodeReady Builder), formerly PowerTools, is an optional repository that provides additional development and dependency packages. Enabling CRB is required (or recommended) before installing EPEL on RHEL 9 and compatible distros like Rocky Linux 9 and Alma Linux 9.
How do I search for packages in EPEL?
Use sudo dnf --enablerepo="epel" search keyword (replace keyword with your search term). To get details about a package: sudo dnf --enablerepo="epel" info package_name.
Conclusion
You now have EPEL and EPEL Next installed and enabled on Rocky Linux 9 or Alma Linux 9. Use dnf search, dnf info, and dnf install with the EPEL repo to add extra packages. For more third-party repos (e.g. newer PHP), see how to install and enable the Remi repository on Alma/Rocky Linux 8 and 9.