The Extra Packages for Enterprise Linux or EPEL is a secondary package repository that is used for installing packages for regularly used software in CentOS. Fedora developers thought about developing a repository comprising all Fedora packages they maintain on RHEL and other similar distributions. The aim of this repository development was to make applications more accessible on  compatible distributions of Enterprise Linux.

A Special Interest group of Fedora Project known as EPEL group is accountable for maintaining the EPEL repository. This repository is responsible for developing and managing a high-quality set of extra packages. The packages present in the EPEL repository can be the software not added to the core repository, or sometimes their updates are not released.

Why you should use EPEL repository on CentOS

Here is a list of some of the benefits of using the EPEL repository:

  • EPEL is a freely available, open-source repository.
  • There are no compatibility issues with the packages in the EPEL repository.
  • You can utilize dnf and yum to install open-source packages from the EPEL repository.
  • EPEL group is accountable for EPEL packages management.

Now, we will demonstrate how to  install the EPEL repository on a CentOS system. So, let’s start!

How to install EPEL repository on CentOS

Open up your CentOS terminal by pressing “CTRL ALT T“. You have to log in as a root user or superuser in the terminal. Now, search for the “epel-release” repository by utilizing the below-given command:

$ yum search epel-release

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-01.png" data-lazy- height="370" src="data:image/svg xml,” width=”830″>

To know more about the EPEL repository, such as its version, architecture, size, source, write out the “yum info” command as follows:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-02.png" data-lazy- height="456" src="data:image/svg xml,” width=”830″>

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-03.png" data-lazy- height="454" src="data:image/svg xml,” width=”830″>

The last step is to execute the below-given command for installing the EPEL repository on your system:

$ sudo yum install epel-release

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-04.png" data-lazy- height="454" src="data:image/svg xml,” width=”830″>

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-05.png" data-lazy- height="452" src="data:image/svg xml,” width=”830″>

How to verify EPEL repository installation on CentOS

The error-free output declares that the EPEL repository is successfully installed on the CentOS system. To confirm its existence, we will search for “epel” in the rpm, which is the Red Hat Package Manager. In CentOS, this utility permits users to update, verify, query, install, uninstall any package. We will add the “-qa” option to perform the “query all installed packages” operation in rpm. Next, we will direct the output of “rpm -qa” to the “grep epel” command using the “[|]” pipe. As a result, it will verify if the EPEL repository is installed or not:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-06.png" data-lazy- height="154" src="data:image/svg xml,” width=”832″>

How to list all active repositories on CentOS

Now, check that the EPEL repository is enabled on your system by listing all active repositories in your CentOS system:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-07.png" data-lazy- height="268" src="data:image/svg xml,” width=”830″>

How to list packages of EPEL repository on CentOS

In your CentOS terminal, you can view a list of packages that EPEL comprises by executing the below-given command:

$ yum –disablerepo=”*” –enablerepo=”epel” list available

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-08.png" data-lazy- height="456" src="data:image/svg xml,” width=”830″>

How to count packages of EPEL repository on CentOS

The “wc” is an acronym for “word count”. The “wc” command is used to count characters, lines, and words. In the “wc” command, the “-l” option is added to print the number of lines. If you want to count the packages in your EPEL repository, then utilize this command:

$ sudo yum –disablerepo=”*” –enablerepo=”epel” list available | wc -l

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-09.png" data-lazy- height="148" src="data:image/svg xml,” width=”830″>

How to search a package in EPEL repository on CentOS

The command that is used for searching a package in the EPEL repository is divided into two parts. The first part of the command will get a list of packages present in the EPEL repository, and in the next part, we will utilize the “grep” command to search for a specific package in the retrieved list. Pipe “[|]” is used for redirecting the packages list to the “grep” command.

In our EPEL repository, we will search for “CFR,” a Java decompiler that decompiles the modern Java features. To do so, we will execute this command in the CentOS terminal:

$ yum –disablerepo=”*” –enablerepo=”epel” list available | grep ‘CFR’

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-10.png" data-lazy- height="218" src="data:image/svg xml,” width=”832″>

How to install a package from EPEL repository on CentOS

Now, we will install the “CFR” package from our EPEL repository by executing the command given below:

$ sudo yum –enablerepo=”epel” install CFR

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-11.png" data-lazy- height="594" src="data:image/svg xml,” width=”830″>

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-12.png" data-lazy- height="596" src="data:image/svg xml,” width=”830″>

You can also check the information related to the CFR package:

$ yum –enablerepo=epel info CFR

The command mentioned above will show you the name, version, architecture, size, and many other details about the “CFR” package:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-13.png" data-lazy- height="590" src="data:image/svg xml,” width=”830″>

How to remove EPEL repository on CentOS

You can erase the EPEL repository by executing the command given below:

$ sudo yum remove epel-release

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/install-epel-repository-centos-14.png" data-lazy- height="676" src="data:image/svg xml,” width=”830″>

Conclusion

EPEL is a software package repository maintained by the EPEL group for Linux-based operating systems such as CentOS. This repository has a lot of additional packages that the core repositories do not have. You have learned about how to install the EPEL repository on CentOS in this post. Moreover, the procedure of installing and enabling any package from the EPEL repository is also provided.

About the author

<img alt="" data-lazy-src="https://secure.gravatar.com/avatar/c73b74cd8044d2e9b300610f5af77d0b?s=112&r=g" data-lazy- height="112" src="data:image/svg xml,” width=”112″>

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.