Exclude a specific repo from YUM Update

Try the disable repo switch:

--disablerepo=REPONAME

UPDATE

To find all repositories currently “known” (enabled and disabled):

yum repolist all

Then to find which repository is giving you grief for the above package, try:

yum list php53-mcrypt-5.3.3-4.ius.el5.x86_64 --showduplicates

This will then show which of your repositories provide the above package (you’ll see “installed” on the list too, to show the locally installed packages).

Try the disable switch again once you know the repository using the disable repo switch.

yum update --disablerepo=[from above]

Failing the steps above to single-out the repository you want to omit, try having a look through /etc/yum.repos.d/, which is the RHEL default location for repository definitions. Once in this directory, locate all non-standard RHEL base and updates repository files and include enabled=0, e.g.,

[repo]
enabled=0

Hope this helps.

Leave a Comment