EPEL, or Extra Packages for Enterprise Linux, is a repository of high-quality software packages compatible with Red Hat Enterprise Linux (RHEL). EPEL is maintained by the Fedora Project, a community of volunteers passionate about free and open-source software. EPEL is well-known and highly used, and it often contains essential packages that are needed daily, especially on servers. It is important to note that EPEL is not affiliated with Red Hat, Inc., and Red Hat does not support it. However, Red Hat does provide coverage for EPEL packages in their enterprise support offering. In addition, many downstream versions of RHEL ship with EPEL pre-installed. Overall, EPEL is a valuable resource for users of RHEL and its derivatives.
In the following tutorial, you will learn how to install the EPEL repository and the EPEL Next repository, the following testing version that can come into use for newer packages when major upgrades occur to the core distribution on Rocky Linux 9.
Table of Contents
Update Rocky Linux
Before proceeding with the tutorial, update your system to ensure all existing packages are up to date to avoid any conflicts during the installation.
sudo dnf upgrade --refresh
Install the EPEL/EPEL Next Repository
The first task is to install the EPEL repository, and the recommendation is to install both repositories.
First, enable the CRB repository.
sudo dnf config-manager --set-enabled crb
Next, install EPEL using the following (dnf) terminal command.
sudo dnf install \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
You can remove the EPEL Next for those users that do not require or want this; remove the last line.
Confirm the EPEL/EPEL Next Installation
Now that you have installed the EPEL repository, verifying the installation is good. The easiest and quickest way is to use the dnf repolist command.
dnf repolist | grep epel
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.
dnf --disablerepo="*" --enablerepo="epel" list available
Example output (Note Large Printout):
As above, you can further filter the list to find specific packages. The example will find phpMyAdmin.
dnf --disablerepo="*" --enablerepo="epel" list available | grep -i <package name>
EPEL Next Example:
dnf --disablerepo="*" --enablerepo="epel-next" list available | grep -i <package name>
Example output with “PHPMyAdmin”:
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 phpMyAdmin
Alternatively, users with EPEL Next can use the following command if a newer package exists.
sudo dnf --enablerepo="epel-next" install phpMyAdmin
Note, you can often not use the –enablerepo and use the standard installation command. However, this doesn’t always work when multiple options are present.
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.
Remove EPEL repository:
sudo dnf remove epel-release
Remove EPEL Next repository:
sudo dnf remove epel-next-release
Comments and Conclusion
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.