How to Install EPEL on Rocky Linux

EPEL (Extra Packages for Enterprise Linux) extends Rocky Linux with thousands of production-ready packages maintained by the Fedora Project. Tools like iotop, fail2ban, updated development libraries, and web server modules arrive through EPEL without sacrificing stability. If the default repositories feel limited, EPEL unlocks modern tools and development capabilities in minutes.

This guide covers installing EPEL on Rocky Linux 10, 9, and 8 with version-specific setup details. Rocky Linux 10 and 9 use the CRB repository, Rocky Linux 8 uses PowerTools, and standard EPEL is sufficient for all three. EPEL Next exists for CentOS Stream 9 compatibility and is optional on Rocky Linux unless a package specifically calls for it.

Refresh and Update Your Rocky Linux System

Before installing EPEL, update your Rocky Linux system with the latest packages. This ensures compatibility and reduces the risk of conflicts during installation. Next, run the following command:

sudo dnf upgrade --refresh

This command will refresh the package repository information and upgrade all the packages on your system to their latest versions.

Import the EPEL Repository

EPEL installation requirements differ by Rocky Linux version. Rocky Linux 10 and 9 rely on the CRB repository for development packages, while Rocky Linux 8 uses PowerTools. Each version needs its development repository enabled before installing EPEL. The standard EPEL release package is sufficient for Rocky Linux; add EPEL Next only if a specific package requires CentOS Stream 9 dependencies.

Check Your Rocky Linux Version and Development Repository Status

Before enabling EPEL, verify your Rocky Linux version and check which development repository (CRB or PowerTools) is available on your system. Run this command to see all available repositories:

dnf repolist --all | grep -E '(crb|powertools)'

Rocky Linux 9 or 10 output (CRB repository):

crb  Rocky Linux 9 - CRB  disabled

Rocky Linux 8 output (PowerTools repository):

powertools  Rocky Linux 8 - PowerTools  disabled

The output shows repository ID, name, and status (enabled or disabled). If CRB appears, you’re on Rocky Linux 9 or 10. Alternatively, if PowerTools appears, you’re on Rocky Linux 8. Next, you’ll enable the appropriate repository in the steps below based on your version.

Option 1: Install EPEL on Rocky Linux 10

Rocky Linux 10 targets RHEL 10 compatibility and uses the CRB repository for development packages. First, enable CRB:

sudo dnf config-manager --set-enabled crb

Following this, install the EPEL repository:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm

Option 2: Install EPEL on Rocky Linux 9

Rocky Linux 9 targets RHEL 9 compatibility and normally uses only the standard EPEL repository. First, enable CRB:

sudo dnf config-manager --set-enabled crb

Then, install the EPEL release package:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

If you need a package that explicitly requires CentOS Stream 9 dependencies, add EPEL Next alongside EPEL:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

Option 3: Install EPEL on Rocky Linux 8

Rocky Linux 8 targets RHEL 8 compatibility and uses the PowerTools repository for development and debugging tools. First, enable PowerTools:

sudo dnf config-manager --set-enabled powertools

Then, install the EPEL repository:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Rocky Linux is an RHEL-compatible distribution and does not require subscription management. Rocky Linux 10 and 9 use the crb (Code Ready Builder) repository, while Rocky Linux 8 uses powertools. The standard epel-release package covers Rocky Linux; enable epel-next-release only when a package specifically calls for CentOS Stream 9 dependencies.

Verify EPEL Installation Success

Verify the EPEL repository is properly configured:

dnf repolist | grep epel

Rocky Linux 10 output (EPEL only):

epel  Extra Packages for Enterprise Linux 10 - x86_64

Rocky Linux 9 output (EPEL only):

epel  Extra Packages for Enterprise Linux 9 - x86_64

If you added EPEL Next for a Stream-specific package, you will also see:

epel-next  Extra Packages for Enterprise Linux 9 - Next - x86_64

Rocky Linux 8 output (EPEL only):

epel  Extra Packages for Enterprise Linux 8 - x86_64

If you see the appropriate EPEL repositories listed, the installation succeeded.

Searching for Available EPEL Packages

With EPEL installed, you can now search for available packages and discover what’s available beyond your default repositories. Use the dnf search command to find packages by keyword:

dnf search htop

The output displays matching packages with brief descriptions:

===================== Name Exactly Matched: htop ======================
htop.x86_64 : Interactive process viewer

==================== Name & Summary Matched: htop ====================
htop-devel.x86_64 : Development files for htop

This searches package names and descriptions across all enabled repositories including EPEL. To view detailed information about a specific package, use dnf info:

dnf info iotop

The output shows complete package metadata including the repository source:

Available Packages
Name         : iotop
Version      : 0.6
Release      : 29.el9
Architecture : noarch
Size         : 59 k
Source       : iotop-0.6-29.el9.src.rpm
Repository   : epel
Summary      : Top like utility for I/O
License      : GPLv2+
Description  : Linux has always been able to show how much I/O was going on
             : (the bi and bo columns of the vmstat 1 command).

Watch for the Repository: epel line to confirm the package comes from EPEL. Additionally, you can list all available EPEL packages with:

dnf repository-packages epel list available | head -20

This command displays the first 20 packages from EPEL with their versions and architectures, making it easy to browse what’s available for your Rocky Linux system.

Installing Your First EPEL Packages

With EPEL installed, you immediately gain access to thousands of packages. Here are practical examples of high-value tools commonly installed from EPEL:

Disk I/O Monitoring: Install iotop

iotop is a real-time disk I/O monitoring tool available only through EPEL, not in Rocky Linux’s default repositories. It shows which processes consume the most disk bandwidth, invaluable for diagnosing slow systems. Install it with:

sudo dnf install iotop

Next, verify the installation completed successfully:

iotop --version

Then, launch the monitor with superuser privileges:

sudo iotop

The interface displays processes sorted by disk I/O activity with columns showing read/write bandwidth, process ID, user, and command. Press q to exit. Use iotop to identify which processes cause disk bottlenecks during database operations, backup tasks, or container workloads.

Intrusion Detection: Install fail2ban

fail2ban monitors logs and blocks repeated failed login attempts, protecting SSH and web services from brute-force attacks. Install it from EPEL:

sudo dnf install fail2ban

Next, start and enable the service:

sudo systemctl start fail2ban && sudo systemctl enable fail2ban

Then, verify fail2ban is running and protecting your system:

sudo fail2ban-client status

This shows active jails (protection rules) monitoring SSH and other services. fail2ban automatically blocks IP addresses after configurable failed login attempts, reducing brute-force attack exposure on internet-facing servers.

System Monitoring: Install htop

htop provides an interactive process viewer with color-coded resource usage, making it easier to monitor system performance compared to the standard top command. Install it from EPEL:

sudo dnf install htop

Next, launch htop to view system resources:

htop

The interface shows CPU usage per core, memory consumption, running processes, and system load averages with intuitive color coding. Press F10 or q to exit. Use htop to quickly identify resource-heavy processes, sort by memory or CPU usage with interactive keys, and send signals to processes directly from the interface.

Troubleshooting Common Issues

PowerTools or CRB Repository Not Found

Verify which repository your Rocky Linux version uses:

cat /etc/rocky-release

Rocky Linux 8 uses powertools, while versions 9 and 10 use crb. Next, check if the repository exists:

dnf repolist --all | grep -E '(powertools|crb)'

If disabled, enable the appropriate one for your version.

EPEL Repository Not Showing After Installation

First, list all configured repositories:

dnf repolist --all

If EPEL appears but shows as disabled, enable it manually:

sudo dnf config-manager --set-enabled epel

If you also installed EPEL Next on Rocky Linux 9, enable it as well:

sudo dnf config-manager --set-enabled epel-next

Package Installation Fails from EPEL

First, clear the DNF cache and rebuild repository metadata:

sudo dnf clean all && sudo dnf makecache

Then, verify EPEL is accessible:

sudo dnf --enablerepo=epel list available | head -20

If packages appear, EPEL is working correctly.

Wrong EPEL Version Installed

First, check your Rocky Linux version:

cat /etc/rocky-release

Next, check installed EPEL version:

rpm -qa | grep epel-release

If versions don’t match, remove the wrong EPEL package:

sudo dnf remove epel-release epel-next-release

Finally, reinstall the correct version following the instructions above.

Disable or Remove EPEL Temporarily

If you need to troubleshoot package conflicts or test whether a package comes from EPEL, you can temporarily disable the repository without uninstalling it:

sudo dnf config-manager --set-disabled epel

If you enabled EPEL Next on Rocky Linux 9, also disable it:

sudo dnf config-manager --set-disabled epel-next

To re-enable EPEL later, use the same syntax with --set-enabled instead of --set-disabled. Alternatively, if you need to completely remove EPEL including all installed packages from it, uninstall the release packages:

sudo dnf remove epel-release epel-next-release

This removes the EPEL repositories from your system but leaves any packages you’ve already installed from EPEL intact. Your other Rocky Linux packages remain unaffected.

Managing and Updating EPEL

Your Rocky Linux system now has EPEL configured and ready to use. EPEL is maintained by the Fedora Project, the upstream organization behind Fedora Linux and supported by Red Hat, ensuring packages are stable and trustworthy. From here, you can install monitoring tools like iotop and fail2ban, additional development libraries, or explore specialized repositories like Remi for PHP versions (which depends on EPEL) or nginx-mainline for web server enhancements.

Keeping EPEL Packages Updated

EPEL packages receive regular security and bug fix updates alongside your standard Rocky Linux updates. Keep your system current by running the system upgrade command:

sudo dnf upgrade

This command updates all installed packages including those from EPEL, thereby ensuring you receive security patches and improvements.

Removing EPEL Packages

To uninstall a specific EPEL package, use the standard DNF remove command:

sudo dnf remove package-name

For example, to remove iotop:

sudo dnf remove iotop

DNF displays any dependent packages that would also be removed and prompts for confirmation before proceeding. The command output shows exactly what will be removed and how much disk space will be freed. Importantly, EPEL repositories remain available for future use even after removing individual packages from them.

Leave a Comment