Adding EPEL Repository on CentOS/RHEL

The following article describes how to install (add) and enable EPEL repository on CentOS/RHEL.

You'll also learn how to verify EPEL installation and how to remove EPEL repository, if needed.

What is EPEL?

EPEL (Extra Packages for Enterprise Linux) is an open source and free community based repository project from Fedora team, which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.

Why you may want to use EPEL repository?

  • Provides lots of open source packages to install via Yum;
  • 100% open source and free to use;
  • Does not provide any core duplicate packages and no compatibility issues;
  • Packages from EPEL are more up to date.

Download and Install EPEL Repository

Install EPEL Repository, depending on your system's version and architecture.

Note the $(arch) variable in below URLs. It automatically changes to x86_64 or i386 depending on your system's architecture.

# CentOS/RHEL 7.x #

Install EPEL Repository on CentOS/RHEL 7.x

# rpm -ivh$(arch)/e/epel-release-7-5.noarch.rpm

# CentOS/RHEL 6.x #

Install EPEL Repository on CentOS/RHEL 6.x

# rpm -ivh$(arch)/epel-release-6-8.noarch.rpm

# CentOS/RHEL 5.x #

Install EPEL Repository on CentOS/RHEL 5.x

# rpm -ivh$(arch)/epel-release-5-4.noarch.rpm

# CentOS/RHEL 4.x #

Install EPEL Repository on CentOS/RHEL 4.x

# rpm -ivh$(arch)/epel-release-4-10.noarch.rpm

Verify EPEL Installation

The EPEL is enabled by default and its configuration is located under /etc/yum.repos.d/ directory in the file epel.repo.
Search for EPEL in the list of yum repositories.
# yum repolist | grep "^epel\|repo id"
Sample output :

repo id     repo name                                           status
epel        Extra Packages for Enterprise Linux 6 - x86_64      8,447

Remove EPEL Repository

Find EPEL package name using 'rpm -qa' command.
# rpm -qa | grep epel
Delete the package using 'rpm -e' command, for example :
# rpm -e epel-release-6-8.noarch