How to Install and Enable Epel Repo on Rocky/Alma Linux 9

Step-by-step guide on How to Install and Enable Epel Repo on Rocky/Alma Linux 9

What is EPEL? Extra Packages for Enterprise Linux (EPEL) is an initiative within the Fedora Project to provide high quality additional packages for linux distributions like Alma Linux, Rocky Linux, CentOS Stream and Red Hat Enterprise Linux (RHEL). EPEL packages will also likely work with other distributions that target RHEL compatibility. It provides a wide array of additional software packages not included in the standard Rocky Linux repositories, enhancing your system’s functionality and usability.

If you are coming from an older version of Rocky linux, checkout

EPEL packages are usually based on their Fedora counterparts and should not conflict with or replace packages in the base Enterprise Linux distributions. EPEL uses much of the same infrastructure as Fedora, including buildsystem, Bugzilla instance, updates manager, mirror manager and more.

What is EPEL-Next? EPEL packages are built against RHEL. EPEL Next packages are built against CentOS Stream. EPEL-Next is not a complete rebuild of all the EPEL packages, but only those packages that need to be rebuilt to install on CentOS Stream. The EPEL-Next repo is meant to be layered on top of the regular EPEL repository.

In this guide we will learn how to install and enable EPEL and EPEL-Next on Rocky Linux 9 but this should also work for distributions that target RHEL compatibility.

Update and refresh your system

Before we proceed, ensure that you have the latest packages installed. This step ensures compatibility and optimizes the system for the new additions. Execute the following command to achieve this:

1
sudo dnf upgrade --refresh

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

Integrate EPEL

Enable the CodeReady Builder repository (CRB)

This repository contains additional packages that complement the main distribution and enhance its capabilities. To enable CRB, execute:

1
sudo dnf config-manager --set-enabled crb

Install EPEL and EPEL Next:

With the CRB enabled, proceed to install the EPEL repositories tailored for Rocky Linux 9 using the following command:

1
2
3
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

Remember to type y when prompted to confirm installation.

Verify EPEL and EPEL Next Installation

Once the EPEL repository is successfully intergrated into our Rocky Linux system, we should validate that it is set up as expected. This ensures the repository has been correctly configured and ready for use. To achieve this, the dnf repolist command serves as an efficient tool.

Execute the following command:

1
dnf repolist | grep epel

If all went as expected, you should see an output similar to this

1
2
3
4
5
$ dnf repolist | grep epel

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

Basic Usage of EPEL

Having an understanding of EPEL or EPEL Next repository commands will enhance your package management experience. These are some of the common usecases

Searching for Specific Packages

If you’re unsure about the exact name of a package but have a general idea, you can use the dnf search command:

1
sudo dnf --enablerepo="epel" search keyword

Replace keyword with a term related to the package you’re looking for. This will return a list of packages that match or are related to the keyword.

Getting Detailed Information

To get detailed information about a specific package, including its description, version, and dependencies:

1
sudo dnf --enablerepo="epel" info package_name

Checking for Package Updates in EPEL

To see if there are updates available for packages you’ve installed from EPEL:

1
sudo dnf --enablerepo="epel" check-update

This will list all packages from EPEL that have updates available.

Removing a Package

If you’ve installed a package from EPEL and wish to remove it:

1
sudo dnf remove package_name

Replace package_name with the name of the package you want to uninstall.

Disabling EPEL Temporarily

There might be times when you want to install or update packages without considering the EPEL repository. To temporarily disable EPEL during a DNF operation:

1
sudo dnf --disablerepo="epel" command

Replace command with the DNF command you wish to execute.

Keeping EPEL Packages Updated

To ensure that all packages you’ve installed from EPEL are updated:

1
sudo dnf --enablerepo="epel" upgrade

This will upgrade all EPEL packages to their latest versions.

Conclusion

In this guide, we learnt how to install EPEL on Rocky Linux 9 and distributions that target RHEL compatibility. EPEL repo gives you access to a wider range of packages. Keep your system updated for smooth integration. With EPEL installed, you can explore and enhance your Rocky Linux system with additional packages.

comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy