How To Install and Enable EPEL Repository on Rocky Linux/Centos 8

Pinterest LinkedIn Tumblr

In this guide, we will learn how to install and enable EPEL repository on Rocky Linux/Centos 8. This guide will also work for RHEL 8 and its derivatives like Alma Linux, Oracle Linux, Scientific Linux, etc.

EPEL is a repository that provides extra packages for Enterprise Linux. The EPEL repository is an additional package repository that provides easy access to install packages for commonly used software. This repo was created because Fedora contributors wanted to use Fedora packages they maintain on RHEL and other compatible distributions. The EPEL group creates, maintains and manages a high-quality set of additional packages. These packages may be software not included in the core repository, or sometimes updates which haven’t been provided yet.

Related Content


You need the following to enable EPEL repo

  • An updated Rocky Linux 8 Server
  • Root Access to the server or user with sudo access
  • Interne access from the server

Table of Content

  1. Updating system
  2. Installing EPEL Repository
  3. Confirming EPEL installation

1. Updating the system

Ensure that the system is up to date using this command:

sudo dnf -y update

2. Install EPEL Repository

Use the following command to install EPEL release:

sudo dnf install

This will download the repository file to /etc/yum.repos.d/epel.repo and enables it. This is the installation output on my machine

$ sudo dnf install
Last metadata expiration check: 2:03:13 ago on Thu 11 Nov 2021 04:08:05 PM UTC.
epel-release-latest-8.noarch.rpm                                                                                                                                             50 kB/s |  23 kB     00:00
Dependencies resolved.
 Package                                            Architecture                                 Version                                           Repository                                          Size
 epel-release                                       noarch                                       8-13.el8                                          @commandline                                        23 k

Transaction Summary
Install  1 Package

Total size: 23 k
Installed size: 35 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                    1/1
  Installing       : epel-release-8-13.el8.noarch                                                                                                                                                       1/1
  Running scriptlet: epel-release-8-13.el8.noarch                                                                                                                                                       1/1
  Verifying        : epel-release-8-13.el8.noarch                                                                                                                                                       1/1



3. Confirming EPEL installation

Use the following command to confirm epel repository:

$ sudo dnf repolist epel | grep epel
epel             Extra Packages for Enterprise Linux 8 - x86_64          enabled

List packages available on EPEL repository.

sudo dnf --disablerepo="*" --enablerepo="epel" list available

You can filter further to check if the required package is available on EPEL repository by piping the output to grep.

$ sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep -i monit
gnome-monitor-config.x86_64                                       0-0.1.20190520.gitbc2f76c.el8                   epel
gnome-shell-extension-system-monitor-applet.noarch                1:38-14.20210722git9a96c54.el8                  epel
monit.x86_64                                                      5.26.0-1.el8                                    epel
monitorix.noarch                                                  3.13.1-1.el8                                    epel
mysql-mmm-monitor.noarch                                          2.2.1-25.el8                                    epel
nordugrid-arc-monitor.noarch                                      6.13.0-1.el8                                    epel
perl-Monitoring-Plugin.noarch                                     0.40-1.el8                                      epel

To install package from EPEL repository, use the --enablerepo="epel" argument to dnf install:

sudo dnf --enablerepo="epel" install <package>


sudo dnf --enablerepo="epel" install monit

The above command might install some dependencies from other repos like the Base repositories.


In this guide we explored how to install and configure EPEL repo in RHEL 8 based systems like Rocky Linux. We saw that when installed, the installe automatically created a .repo file under /etc/yum.repos.d directory. You can disable the repository at any time by turning off the enabled flag.

I am a Devops Engineer, but I would describe myself as a Tech Enthusiast who is a fan of Open Source, Linux, Automations, Cloud and Virtualization. I love learning and exploring new things so I blog in my free time about Devops related stuff, Linux, Automations and Open Source software. I can also code in Python and Golang.

Write A Comment