How does one tell yum to ignore a repo file with a parsing error?

45 Views Asked by At

I have a webserver where I can install things using yum but do not have access to the /etc/yum.repos.d directory, rpm, nor yum-config-manager. I installed an rpm that added a repository but it has parsing error in it. Is there a way to tell yum to ignore that file (or all files) in order to remove the item that added it (thus removing the .repo file with the parsing error)?

OS: RHEL7

I've tried disabling the repo, disabling all repos, using -t to be fault tolerant, and -C to run from cache only. Still get parsing error.

1

There are 1 best solutions below

0
fauxanadu On

Figured a waybout:

  • copied the /etc/yum.conf and /etc/yum.repos.d/ to a local directory
  • fixed issue in the copied .repo file
  • updated the copied yum.conf repodir key to point at copied directory
  • ran yum using sudo yum --config ./yum.conf remove <bad>.rpm