yum keeps re-adding old repos??

General support questions
Post Reply
phil.e
Posts: 31
Joined: 2018/02/13 20:28:14

yum keeps re-adding old repos??

Post by phil.e » 2018/04/18 21:17:53

I manage a bunch of CentOS 6 workstations that have no internet access, so none of them can reach out to centos.org or any mirrors.

I created repos internal to our network that mirror CentOS-Base, CentOS-Updates, and EPEL and put these repos on each workstation.

After an update though, yum re-adds all the repos that I deleted because they can't be accessed anyway - CentOS-Debuginfo, *-fastrack, *.Media, and *Vault.

This is very annoying - how can I stop this from happening and force yum to stick to the internal repos?

Thanks

User avatar
avij
Forum Moderator
Posts: 2621
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: yum keeps re-adding old repos??

Post by avij » 2018/04/18 21:20:23

Don't delete the CentOS .repo files, but instead, set enabled=0 for each repository listed in those .repo files.

phil.e
Posts: 31
Joined: 2018/02/13 20:28:14

Re: yum keeps re-adding old repos??

Post by phil.e » 2018/04/18 21:51:41

That sounds like kind of a work around. Isn't it possible to just stop them from being re-created altogether?

User avatar
TrevorH
Forum Moderator
Posts: 23213
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: yum keeps re-adding old repos??

Post by TrevorH » 2018/04/18 21:56:02

No. The files belong to the centos-release package so if that gets updated and the files are missing then they get put back. They are marked as config,noreplace in the spec files deliberately so that if the files are present but modified then they do not get replaced and a .rpmnew file is created instead. It's not a workaround, it's the correct fix.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply