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 fail2ban for intrusion detection, htop for interactive process monitoring, and nvtop for GPU monitoring arrive through EPEL without sacrificing the stability that enterprise environments require. If the default repositories feel limited for your workloads, 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. Each version requires enabling a development repository before EPEL works correctly: Rocky Linux 10 and 9 use the CRB (CodeReady Builder) repository, while Rocky Linux 8 uses PowerTools. Understanding this prerequisite prevents common package dependency errors during installation.

This guide supports Rocky Linux 10 (Red Quartz), Rocky Linux 9 (Blue Onyx), and Rocky Linux 8 (Green Obsidian). Commands are verified on minimal installations where the dnf-plugins-core package may not be present by default.

Choose Your EPEL Installation Method

Rocky Linux offers two ways to install EPEL, each suited to different scenarios. Both methods result in the same package configuration, so choose based on your environment and preferences.

MethodCommandBest For
DNF Packagednf install epel-releaseStandard Rocky Linux installations with extras repo enabled
Direct RPMdnf install https://dl.fedoraproject.org/...rpmMinimal containers, custom environments, or when extras repo is unavailable

For most users, the DNF package method is recommended because Rocky Linux includes the epel-release package in its extras repository. The direct RPM method serves as a reliable fallback for minimal installations or when the extras repository is disabled.

Prepare Your Rocky Linux System

Before installing EPEL, ensure your system packages are current and the required tools are available. This preparation step prevents dependency conflicts and ensures a smooth installation process.

First, update your system packages:

sudo dnf upgrade --refresh

This command refreshes the package repository metadata and upgrades all packages to their latest versions. On a minimal Rocky Linux installation or Docker container, you also need the dnf-plugins-core package to enable repositories. Install it with:

sudo dnf install -y dnf-plugins-core

This package provides the dnf config-manager command used in the installation steps below. Standard Rocky Linux desktop and server installations typically include this package by default, but minimal installations and containers often omit it.

Enable the Development Repository

Many EPEL packages depend on development libraries that Rocky Linux provides through a separate repository. Enabling this repository before installing EPEL prevents dependency resolution failures.

Check Your Rocky Linux Version

First, verify your Rocky Linux version to determine which development repository you need:

cat /etc/rocky-release

Expected output on Rocky Linux 10:

Rocky Linux release 10.1 (Red Quartz)

Rocky Linux 10 and 9 use the crb (CodeReady Builder) repository, while Rocky Linux 8 uses powertools. Confirm which repository is available on your system:

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

On Rocky Linux 10:

crb                        Rocky Linux 10 - CRB                         disabled

On version 9:

crb                     Rocky Linux 9 - CRB                             disabled

For version 8:

powertools               Rocky Linux 8 - PowerTools                     disabled

The “disabled” status is expected. Enable the appropriate repository in the next step based on your version.

Enable CRB on Rocky Linux 10 or 9

Rocky Linux 9 and 10 provide the /usr/bin/crb utility specifically for managing the CRB repository. This is the recommended method:

sudo /usr/bin/crb enable

Expected output:

CRB repo is enabled and named: crb

Alternatively, you can use the standard DNF config-manager approach:

sudo dnf config-manager --set-enabled crb

Both methods achieve the same result. The crb utility simply provides a shorter command with clearer feedback.

Enable PowerTools on Rocky Linux 8

Rocky Linux 8 uses the PowerTools repository instead of CRB. Enable it with:

sudo dnf config-manager --set-enabled powertools

Next, verify the repository is now enabled:

dnf repolist | grep powertools

Expected output:

powertools               Rocky Linux 8 - PowerTools

Install the EPEL Repository

With the development repository enabled, you can now install EPEL. Rocky Linux includes epel-release in its extras repository, making installation straightforward on most systems.

Method 1: Install via DNF (Recommended)

The simplest approach works on Rocky Linux 10, 9, and 8:

sudo dnf install -y epel-release

This command fetches the EPEL release package from the Rocky Linux extras repository and configures the EPEL repository on your system. The installation output includes a reminder about enabling CRB:

Installed:
  epel-release-10-7.el10_1.noarch

Complete!
Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

Since you already enabled CRB or PowerTools in the previous step, this reminder can be safely ignored.

Method 2: Install via Direct RPM URL

If the extras repository is unavailable (common in minimal containers or custom environments), download and install the EPEL release package directly from the Fedora Project mirror.

Rocky Linux 10:

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

Version 9:

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

Rocky 8:

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

Rocky Linux does not require subscription management like RHEL. The standard epel-release package covers all Rocky Linux versions. EPEL Next (designed for CentOS Stream compatibility) exists only for version 9 and is rarely needed on Rocky Linux unless a specific package explicitly requires CentOS Stream 9 dependencies.

Verify EPEL Installation

Confirm that EPEL is properly configured and enabled on your system:

dnf repolist | grep epel

On Rocky Linux 10:

epel                 Extra Packages for Enterprise Linux 10 - x86_64

On version 9:

epel                Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64

For version 8:

epel                  Extra Packages for Enterprise Linux 8 - x86_64

If you see the EPEL repository listed, the installation succeeded. The cisco-openh264 repository appears on Rocky Linux 9 and provides the OpenH264 codec for video applications.

Search and Explore EPEL Packages

With EPEL installed, you now have access to thousands of additional packages. Use the dnf search command to find packages by keyword:

dnf search htop

Example output on Rocky Linux 10:

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

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

dnf info htop

Sample output:

Available Packages
Name         : htop
Version      : 3.3.0
Release      : 5.el10_0
Architecture : x86_64
Size         : 196 k
Source       : htop-3.3.0-5.el10_0.src.rpm
Repository   : epel
Summary      : Interactive process viewer
License      : GPL-2.0-or-later
Description  : htop is an interactive text-mode process viewer for Linux, similar to
             : top(1).

The Repository: epel line confirms this package comes from EPEL rather than the base repositories. You can also list all available EPEL packages with:

dnf repository-packages epel list available | head -20

This 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.

Install Common EPEL Packages

EPEL provides tools that many system administrators find essential. Here are practical examples of high-value packages available through EPEL.

Intrusion Prevention with fail2ban

fail2ban monitors log files and automatically blocks IP addresses that show malicious behavior, such as repeated failed SSH login attempts. This package is available through EPEL on all Rocky Linux versions:

sudo dnf install -y fail2ban

After installation, start and enable the service so it runs automatically at boot:

sudo systemctl enable --now fail2ban

Verify the service is running and check which jails (protection rules) are active:

sudo fail2ban-client status

Expected output:

Status
|- Number of jail:      1
`- Jail list:   sshd

The default configuration protects SSH connections. fail2ban automatically bans IP addresses after a configurable number of failed login attempts, significantly reducing brute-force attack exposure on internet-facing servers. For more comprehensive protection, refer to our SSH configuration guide for Rocky Linux.

Interactive Process Monitoring with 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 -y htop

Next, verify the installation:

htop --version

Expected output:

htop 3.3.0

Launch the monitor:

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, and send signals to processes directly from the interface.

GPU Monitoring with nvtop

nvtop provides real-time GPU utilization monitoring similar to htop and supports multiple GPU vendors including AMD, Intel, and NVIDIA. This package is available through EPEL:

sudo dnf install -y nvtop

After installation, launch nvtop to view GPU memory usage, temperature, and running processes:

nvtop

This tool is particularly valuable for monitoring machine learning workloads, video encoding, or any GPU-intensive tasks. For NVIDIA hardware specifically, ensure you have the NVIDIA drivers installed on Rocky Linux before using nvtop.

Troubleshoot Common Issues

config-manager Command Not Found

If you see “No such command: config-manager” when trying to enable repositories, the dnf-plugins-core package is missing. This commonly occurs on minimal Rocky Linux installations or Docker containers.

Install the required package:

sudo dnf install -y dnf-plugins-core

After installation, retry the repository enable command.

CRB or PowerTools Repository Not Found

If enabling CRB or PowerTools fails, first verify your Rocky Linux version:

cat /etc/rocky-release

Next, confirm the repository exists:

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

Rocky Linux 8 uses powertools, while versions 9 and 10 use crb. Using the wrong repository name for your version will cause an error. If the repository appears missing entirely, your Rocky Linux installation may be incomplete or using a custom minimal configuration.

EPEL Repository Not Showing After Installation

If EPEL doesn’t appear in dnf repolist after installation, list all configured repositories including disabled ones:

dnf repolist --all | grep epel

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

sudo dnf config-manager --set-enabled epel

Package Installation Fails with Dependency Errors

If installing an EPEL package fails with dependency errors, ensure you’ve enabled the development repository (CRB or PowerTools). Many EPEL packages depend on development libraries from these repositories.

First, clear the DNF cache and rebuild repository metadata:

sudo dnf clean all && sudo dnf makecache

Verify both EPEL and CRB (or PowerTools) are enabled:

dnf repolist

You should see entries for both the EPEL repository and the development repository (crb or powertools) in the output.

Wrong EPEL Version Installed

If you accidentally installed the wrong EPEL version (for example, EPEL 9 on Rocky Linux 10), check the installed package:

rpm -qa | grep epel-release

Next, remove the incorrect version:

sudo dnf remove epel-release

Then reinstall the correct version using the instructions earlier in this guide.

Manage and Update EPEL

Your Rocky Linux system now has EPEL configured and ready for use. EPEL is maintained by the Fedora Project, the upstream organization behind Fedora Linux, ensuring packages are stable and trustworthy for enterprise environments. From here, you can install monitoring tools like fail2ban and htop, additional development libraries, or explore specialized repositories like Remi repository for PHP versions on Rocky Linux (which depends on EPEL) or Nginx mainline on Rocky Linux.

Keep 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, ensuring you receive security patches and improvements.

Disable 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

To re-enable EPEL later:

sudo dnf config-manager --set-enabled epel

This approach is useful when diagnosing which repository provides a specific package or when you need to temporarily isolate package sources during troubleshooting.

Remove EPEL Completely

To completely remove the EPEL repository from your system:

sudo dnf remove epel-release

This removes the EPEL repository configuration but leaves any packages you’ve already installed from EPEL intact. Those packages will no longer receive updates until you reinstall EPEL or remove them individually.

Remove Individual EPEL Packages

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

sudo dnf remove htop

DNF displays any dependent packages that would also be removed and prompts for confirmation before proceeding. The EPEL repository remains available for future installations even after removing individual packages.

Leave a Comment

Let us know you are human: