How to remove yum repository?

General support questions including new installations
jnojr
Posts: 128
Joined: 2007/11/29 23:42:03
Location: San Diego, CA
Contact:

How to remove yum repository?

Postby jnojr » 2010/01/12 21:00:22

I don't want to disable it... I want to completely remove it, so it doesn't sneak back later. I don't see a yum --removerepo and Googling leads to instructions to disable.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

How to remove yum repository?

Postby gerald_clark » 2010/01/12 21:02:44

Repositories are installed and removed using the 'rpm' command.
man rpm

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to remove yum repository?

Postby pschaff » 2010/01/12 21:14:14

jnojr wrote:
I don't want to disable it... I want to completely remove it, so it doesn't sneak back later. I don't see a yum --removerepo and Googling leads to instructions to disable.


Repo configs are stored in /etc/yum.repos.d/*.repo or occasionally (and inadvisedly) appended to the end of /etc/yum.conf. If there is a file in /etc/yum.repos.d/ it can be removed from visibility to yum by deleting or renaming it to something other than .repo.

If a repo config was installed with yum or rpm, then the package should be removed.

Code: Select all

rpm -qf /etc/yum.repos.d/RepoName.repo
will give you the name of the package. For instance:

Code: Select all

# rpm -qf /etc/yum.repos.d/rpmforge.repo
rpmforge-release-0.5.1-1.el5.rf
# yum remove rpmforge-release


Edit: I see that while I was on the phone Gerald beat me to the punch yet again . :-)

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: How to remove yum repository?

Postby gerald_clark » 2010/01/12 21:36:21

Just trying to catch up! :-)

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to remove yum repository?

Postby pschaff » 2010/01/12 22:05:32

So shall we make the contest on total posts, or total characters posted? :-)

User avatar
AlanBartlett
Forum Moderator
Posts: 9317
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: How to remove yum repository?

Postby AlanBartlett » 2010/01/13 14:43:20

So shall we make the contest on total posts, or total characters posted? :-)

Are toracat and I allowed to take part? :-P

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to remove yum repository?

Postby pschaff » 2010/01/13 15:02:51

Dunno - looks like it may be a grudge match well down the rankings from you luminaries. ;-)
Should be a design goal for website 2.0 - Track total posts and total size. Provide rankings. :-)

User avatar
AlanBartlett
Forum Moderator
Posts: 9317
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: How to remove yum repository?

Postby AlanBartlett » 2010/01/13 15:09:46

Ha! Rankings.

How about this URL? ;-)

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to remove yum repository?

Postby pschaff » 2010/01/13 15:32:55

Well, I kind of like that one. :-D

Shall I lock this hijacked thread now? ;-)

User avatar
AlanBartlett
Forum Moderator
Posts: 9317
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: How to remove yum repository?

Postby AlanBartlett » 2010/01/13 16:44:23

Well, I kind of like that one. :-D

Somehow I knew you would. However pschaff isn't always heading the list . . .

Shall I lock this hijacked thread now? ;-)

Not until toracat and Ned have made their postings! 8-)