Quick answer. On Rocky Linux or AlmaLinux 8, 9 or 10, epel-release is in the default extras repo:
sudo dnf install -y epel-release
sudo crb enable
dnf repolist | grep -E 'epel|crb|powertools'
crb enable comes with epel-release. It turns on the repo EPEL packages depend on: PowerTools on EL 8, CRB on EL 9 and 10. On RHEL, see the RHEL section.
EPEL (Extra Packages for Enterprise Linux) is a Fedora Project repository of extra packages for RHEL and its rebuilds: Rocky Linux, AlmaLinux, Oracle Linux and CentOS Stream. It adds software that is not in the base repos (htop, monit, fail2ban, certbot and many more) and never replaces a base package.
This guide covers EL 8, 9 and 10. The commands were tested on Rocky Linux 8, 9 and 10 and AlmaLinux 10.
Prerequisites
- Rocky Linux, AlmaLinux or RHEL 8, 9 or 10, or CentOS Stream 9 or 10 (Stream 10 follows the Rocky and Alma steps)
- A user with
sudo - Internet access to
dl.fedoraproject.orgmirrors
Update the system first:
sudo dnf upgrade --refresh -y
Rocky Linux and AlmaLinux (8, 9 and 10)
Install the release package from the extras repo, which is enabled by default:
sudo dnf install -y epel-release
Then enable the CodeReady Builder repo. Many EPEL packages depend on packages from it:
sudo crb enable
The crb helper knows the repo’s name on each release:
| Release | Repo enabled by crb enable | Manual equivalent |
|---|---|---|
| EL 8 | powertools | sudo dnf config-manager --set-enabled powertools |
| EL 9 | crb | sudo dnf config-manager --set-enabled crb |
| EL 10 | crb | sudo dnf config-manager --set-enabled crb |
The manual commands need dnf-plugins-core (sudo dnf install -y dnf-plugins-core).
RHEL 8, 9 and 10
RHEL has no epel-release in its own repos. Enable CodeReady Builder through subscription-manager, then install the release RPM from Fedora. rpm -E %rhel expands to your major version:
sudo subscription-manager repos --enable codeready-builder-for-rhel-$(rpm -E %rhel)-$(arch)-rpms
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
The same URL install also works on Rocky and Alma if the extras repo is disabled.
CentOS Stream 9 and EPEL Next
EPEL Next is built against CentOS Stream rather than RHEL. It holds the few packages that need a rebuild for Stream, and you use it on top of regular EPEL. Only EL 9 has it today: EPEL Next 8 was retired with CentOS Stream 8, and EL 10 never had one.
Install it on CentOS Stream 9 only. Rocky, Alma and RHEL should not use it:
sudo dnf config-manager --set-enabled crb
sudo dnf install -y epel-release epel-next-release
Verify EPEL
dnf repolist | grep -E 'epel|crb|powertools'
On Rocky Linux 9 the output looks like this:
crb Rocky Linux 9 - CRB
epel Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
The release package writes its repo files to /etc/yum.repos.d/epel*.repo. Install a package from EPEL to confirm:
sudo dnf install -y htop
Basic usage of EPEL
Once enabled, EPEL is just another repo, so plain dnf install <package> works. These commands limit dnf to EPEL when you need to.
List what EPEL offers
dnf --disablerepo="*" --enablerepo="epel" list available
dnf --disablerepo="*" --enablerepo="epel" list available | grep -i monit
Search and inspect packages
dnf --disablerepo="*" --enablerepo="epel" search keyword
dnf info package_name
Check for and apply updates
dnf --disablerepo="*" --enablerepo="epel" check-update # EPEL updates only
sudo dnf upgrade # everything, EPEL included
Don’t run upgrade with base repos disabled: EPEL packages depend on them, so dependency resolution can fail.
Skip EPEL for one command
sudo dnf --disablerepo="epel" upgrade
Disable or remove EPEL
sudo dnf config-manager --set-disabled epel # keep it installed but off
sudo dnf remove epel-release # remove the repo entirely
Removing epel-release does not remove packages you installed from EPEL.
Frequently Asked Questions (FAQ)
What is EPEL?
EPEL (Extra Packages for Enterprise Linux) is a Fedora Project repository with additional packages for RHEL and compatible distributions (Rocky Linux, AlmaLinux, Oracle Linux, CentOS Stream). Its packages are built from Fedora and work alongside the base packages, never replacing them.
How do I install EPEL on Rocky Linux or AlmaLinux?
Run sudo dnf install -y epel-release, then sudo crb enable. This works on versions 8, 9 and 10. Verify with dnf repolist | grep epel.
Do I need CRB or PowerTools for EPEL?
Yes, for most packages. Many EPEL packages depend on packages from CodeReady Builder, which was called PowerTools on EL 8. Run sudo crb enable, or the dnf config-manager command for your release from the table above.
Should I install EPEL Next on Rocky Linux or AlmaLinux?
No. EPEL Next is for CentOS Stream 9 only. Rocky Linux, AlmaLinux and RHEL use regular EPEL.
Is EPEL available for EL 10?
Yes. dnf install epel-release works on Rocky Linux 10 and AlmaLinux 10, and RHEL 10 installs epel-release-latest-10.noarch.rpm.
Conclusion
EPEL takes two commands on Rocky Linux and AlmaLinux, dnf install epel-release and crb enable, and the same steps apply on 8, 9 and 10. On RHEL, enable CodeReady Builder with subscription-manager and install the release RPM from Fedora. For newer PHP and other packages EPEL does not carry, see how to enable the Remi repository on RHEL, Rocky, Alma and CentOS.