This guide shows how to enable the EPEL repository on RHEL, CentOS, AlmaLinux, and Rocky Linux to install additional open source packages using the yum or dnf package manager. Instructions cover EL9, EL8, and CentOS 7, whether you are running a bare metal server, a dedicated server, or a Linux VPS.
Setting up a fresh server? If you need a clean AlmaLinux or Rocky Linux VPS to follow this guide, see our KVM VPS plans in Los Angeles and other US and EU locations.
What is EPEL?
EPEL (Extra Packages for Enterprise Linux) is a free, open source community repository maintained by the Fedora project. It provides high quality add-on packages for enterprise Linux distributions including RHEL, CentOS, AlmaLinux, and Rocky Linux. EPEL packages cover networking, system administration, programming, monitoring, and more. The project is not part of RHEL or CentOS but is designed to be fully compatible with them.
Why Use the EPEL Repository?
- Provides thousands of open source packages not included in the base OS repositories
- Fully open source and free to use
- No core duplicate packages and no compatibility conflicts with base repositories
- All packages are maintained by the Fedora project and community
- Works on RHEL, CentOS, AlmaLinux, Rocky Linux, and Scientific Linux
Before You Start
- You must be logged in as root or have sudo access
- Confirm your OS version with
cat /etc/os-releasebefore running any commands - Make sure your system packages are fully updated before enabling EPEL
- An active internet connection is required to download the EPEL release package
How to Enable EPEL on AlmaLinux 9 / Rocky Linux 9 / RHEL 9
On EL9-based distributions, EPEL is installed using dnf. AlmaLinux 9 and Rocky Linux 9 include EPEL in their default repository configuration, so a single command is all that is needed.
AlmaLinux 9 / Rocky Linux 9
sudo dnf install epel-release -y |
RHEL 9
On RHEL 9, you must also enable the CodeReady Linux Builder repository before installing EPEL:
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y |
How to Enable EPEL on AlmaLinux 8 / Rocky Linux 8 / RHEL 8
AlmaLinux 8 / Rocky Linux 8
sudo dnf install epel-release -y |
RHEL 8
On RHEL 8, enable the CodeReady Linux Builder repository first:
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y |
Tip: If you are migrating from a CentOS 7 server to AlmaLinux 8 or Rocky Linux 8, it is often faster to deploy a fresh VPS and migrate your data than to do an in-place conversion. Owned Networks deploys AlmaLinux and Rocky Linux KVM VPS instances in under 2 minutes. See our KVM VPS plans in Amsterdam for EU-based servers.
How to Enable EPEL on CentOS 7
CentOS 7 reached end-of-life on June 30, 2024. It no longer receives security updates. If you are still running CentOS 7, plan a migration to AlmaLinux or Rocky Linux. That said, EPEL 7 packages are still available and the following command still works:
sudo yum install epel-release -y |
How to Verify the EPEL Repository is Enabled
After installation, confirm EPEL is active by listing all enabled repositories:
EL8 / EL9 (AlmaLinux, Rocky Linux, RHEL)
sudo dnf repolist |
CentOS 7
sudo yum repolist |
You should see epel listed in the output with a package count. If EPEL does not appear, re-run the install command and check your internet connectivity.
How to Install a Package from EPEL
Once EPEL is enabled, use dnf or yum to search for and install packages normally. EPEL packages are available automatically — no special flags are required.
Search for a package
sudo dnf search <package-name> |
Install a package
sudo dnf install <package-name> -y |
For example, to install htop from EPEL:
sudo dnf install htop -y |
Note: The EPEL configuration file is located at /etc/yum.repos.d/epel.repo.
CentOS 4, 5, and 6
CentOS 4, 5, and 6 are all end-of-life and no longer receive updates or security patches. The original EPEL RPM URLs for these versions no longer resolve. If you are running any of these versions, migrating to a supported distribution such as AlmaLinux 8 or Rocky Linux 9 is strongly recommended. Running EOL Linux versions on a public-facing server is a significant security risk.
Related Solution
Migrating off CentOS to AlmaLinux or Rocky Linux?The cleanest migration path is a fresh server. Deploy a new AlmaLinux or Rocky Linux VPS, install your stack, transfer your data, then decommission the old server — no in-place conversion risk.
|
Frequently Asked Questions
What is EPEL used for?
EPEL provides additional open source packages that are not included in the default RHEL, CentOS, AlmaLinux, or Rocky Linux repositories. Common uses include installing monitoring tools, development libraries, network utilities, and system administration software that are maintained by the Fedora community.
Does EPEL work on AlmaLinux and Rocky Linux?
Yes. AlmaLinux and Rocky Linux are RHEL-compatible distributions and EPEL fully supports both. On AlmaLinux 8/9 and Rocky Linux 8/9, installing EPEL is a single dnf install epel-release command — no manual RPM download required.
Is EPEL safe to use on a production server?
Yes, for most purposes. EPEL packages are community-maintained and do not conflict with or replace base OS packages. However, as with any third-party repository, review the specific package before installing on a critical production server. Testing on a staging VPS first is always a good practice.
Can I use EPEL on CentOS 7?
Yes, EPEL 7 packages are still available and yum install epel-release still works. However, CentOS 7 reached end-of-life in June 2024 and no longer receives security updates. You should plan to migrate to AlmaLinux 8 or 9, or Rocky Linux 8 or 9 as soon as possible.
What happened to CentOS 6 and CentOS 5 EPEL support?
EPEL support for CentOS 6 and CentOS 5 has been discontinued. The original RPM installation URLs for those versions no longer resolve. Both distributions are long past end-of-life. If you are still running either, migration to a supported OS is urgent.
Do I need a VPS to test EPEL package installations?
A test server is a good idea before enabling new repositories or installing unfamiliar packages on production. A fresh AlmaLinux or Rocky Linux VPS lets you validate the package, confirm no conflicts, and roll back instantly if something breaks. You can view our KVM VPS options for a low-cost test environment.