I have RHEL 6 and have installed a bunch of the common repos (epel, etc) and somehow screwed up the repos (I think with a repo clean command)

I was getting errors specifically with EPEL, so I removed it:

rpm -e epel-release608.noarch

-> "error: package epel-releaase6-8.noarch is not installed"

and tried to reinstall it:

rpm -ivh epel-release-6-8.noarch.rpm

-> "package epel-release-6-8.noarch is already installed"

How do I get out of this infinite loop?

  • 2
    1. rpm -qa | grep epel-release. 2. yum remove <package_name.rpm> – Tejas Oct 17 '14 at 8:18

Can you make sure you have no epel-release packages left by listing all packages and grepping epel?

rpm -qa | grep epel

If there is no package in that list, you can also force install the epel-release package by running:

rpm -ivh --force epel-release-6-8.noarch.rpm
  • It's still in the list, but when trying to remove it, it fails due to dependencies (other repos need it). – Jason Oct 20 '14 at 1:31
  • yum repolist gives me an error: "Error: Cannot retrieve metalink for repository: epel. Please verify it's path and try again." – Jason Oct 20 '14 at 1:32

The following combination of things worked for me:

  • delete the actual files in /etc/yum.repos.d

  • yum clean all

  • rpm -qa | grep epel (still shows)

  • yum remove epel*

  • yum clean all

This finally cleaned it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.