How to Install EPEL on CentOS Stream 9

EPEL (Extra Packages for Enterprise Linux) is a repository of high-quality add-on packages for Linux distributions like CentOS Stream maintained by the Fedora Project. EPEL provides a wide array of additional software packages not included in the standard CentOS repositories, enhancing your system’s functionality and usability. EPEL Next is a companion repository that provides newer versions of packages to ensure compatibility with the latest updates and features in CentOS Stream.

To enable EPEL and EPEL Next on CentOS Stream 9, you can use the command-line terminal. This guide will walk you through the steps to set up these repositories, ensuring you have access to a broader range of software packages.

Update CentOS Stream Before EPEL Installation

It is important to update your system before proceeding with the tutorial to ensure that all existing packages are up to date and to prevent any conflicts during installation.

sudo dnf upgrade --refresh

Install EPEL and EPEL Next

Initially, activate the CRB repository. For those unfamiliar, CRB is the new repository for CentOS Stream tools, replacing the older PowerTools repository.

sudo dnf config-manager --set-enabled crb

Now, use the following terminal command (dnf) to install EPEL.

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

Users who don’t need or want it can remove EPEL Next by simply deleting the last line in the above command.

Confirm EPEL Installation

Now that the EPEL repository has been installed, verifying the installation’s a good idea. The most straightforward and quickest method is to use the dnf repolist command.

dnf repolist | grep epel
Confirming EPEL presence on CentOS Stream
Example screenshot to confirm EPEL is present on CentOS Stream

As mentioned earlier, the repository has been displayed and successfully installed.

EPEL Repository Command Examples

Next, the tutorial will run through some commands you may find handy in your terminal searching the repository.

First, to list all the packages that are available in the EPEL repository, use the command:

dnf list available --enablerepo=epel

Search for a specific package in the EPEL repository, use the command:

dnf search package-name --enablerepo=epel

To install a package from the EPEL repository, use the command:

dnf install package-name --enablerepo=epel

Lastly, to check for updates on packages installed from the EPEL repository, use the command:

dnf check-update --enablerepo=epel

Additional EPEL Commands on CentOS Stream

Remove EPEL From CentOS Stream

Ideally, the EPEL repository should not have to be removed after it is installed, but if necessary, use the following command to remove it.

Remove EPEL repository:

sudo dnf remove epel-release

Remove EPEL Next repository:

sudo dnf remove epel-next-release

Conclusion

By enabling EPEL and EPEL Next on your CentOS Stream system, you gain access to various additional software packages that enhance your system’s capabilities. Regularly updating these repositories ensures you benefit from the latest features and improvements. Enjoy the increased functionality and versatility that EPEL and EPEL Next bring to your CentOS Stream environment.

Leave a Comment