How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

EPEL, which stands for Extra Packages for Enterprise Linux, is an open-source and free repository that provides extra packages for Enterprise Linux. The EPEL repository was created because Fedora contributors wanted to use Fedora packages they maintain on RHEL and other compatible distributions such as Rocky Linux, CentOS, AlmaLinux, to name a few.

The EPEL repository is also known for bringing additional packages and updated packages that may be behind in the core repository, along with dependencies required by other external repositories, for example, the Remi PHP repository.

In the following tutorial, you will learn how to install the EPEL repository along with the EPEL Next repository, which is the next testing version that can come into use for newer packages when major upgrades occur to the core distribution on Rocky Linux 8.

Prerequisites

  • Recommended OS: Rocky Linux 8.+.
  • User account: A user account with sudo or root access.
  • Internet Access
  • Valid e-mail address to sign up an account.

Update Operating System

Update your Rocky Linux operating system to make sure all existing packages are up to date:

sudo dnf upgrade --refresh -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@rockylinux ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on How to Add a User to Sudoers on Rocky Linux.

To use the root account, use the following command with the root password to log in.

su

For desktop users, the tutorial will utilize the terminal for the installation found in Activities > Show Applications > Terminal.

Example:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

Install the EPEL or EPEL Next Repository

The first task is to install the EPEL repository. As explained, you can install two options; however, it is highly advised not to install EPEL Next unless you specifically require it for system stability.

In your terminal, execute the following command to begin the installation.

Install EPEL Repository (Recommended):

sudo dnf install epel-release

Alternative Method for EPEL Repository 8 Series:

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

Example output:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

Type Y, then press the ENTER KEY to proceed with the installation.

For users wanting to install the EPEL Next repository, you need to have EPEL installed. Once done, use the following command.

Install EPEL Next Repository:

sudo dnf install epel-next-release

Example output:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

Type Y, then press the ENTER KEY to proceed with the installation.

Confirm the EPEL or EPEL Next Installation

Now that you have installed the EPEL repository, verifying the installation is a good idea. The easiest and quickest way is to use the dnf repolist command.

sudo dnf repolist

Example output:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

As above, the repository is shown and successfully installed.

EPEL Repository Tips

One of the handy tricks when using EPEL or EPEL Next repository is to list the available packages.

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

Example output (Note Large Printout):

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

As above, you can further filter the list to find specific packages. The example will find python3-certbot-nginx.

EPEL Example:

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep -i nginx

EPEL Next Example:

sudo dnf --disablerepo="*" --enablerepo="epel-next" list available | grep -i nginx

Example output:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

Now that you have found the EPEL containing the packages you want to install, use the following command to install them straight out of the EPEL repository.

Example (Replace with your package name):

sudo dnf --enablerepo="epel" install python3-certbot-nginx

Example output:

How to Install & Enable EPEL / EPEL Next Repository on Rocky Linux 8

Alternatively, users with EPEL Next can use the following command if a newer package exists.

sudo dnf --enablerepo="epel-next" install python3-certbot-nginx

How to Remove (Uninstall) EPEL or EPEL Next

Ideally, you should not need to remove the repository once installed. However, if you must remove it, use the following command.

To remove EPEL repository:

sudo dnf remove epel-release

To remove EPEL Next repository:

sudo dnf remove epel-next-release

Comments and Conclusion

In the tutorial, you have learned how to import the EPEL repository on Rocky Linux 8, along with various options and tips in using EPEL to your advantage on your system.

Overall, EPEL is a well-known and highly used repository. You will likely need to install this on downstream versions of RHEL as it often contains essential packages every day, especially on servers.



Follow LinuxCapable.com!

Like to get automatic updates? Follow us on one of our social media accounts!