yum keeps re-adding old repos??

General support questions
Post Reply
phil.e
Posts: 97
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
Retired Moderator
Posts: 3046
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: 97
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
Site Admin
Posts: 33202
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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply