Ask Your Question

Removing a repo from the Repository List

asked 2015-07-24 05:35:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have a fairly fresh install of Fedora 21 ( less than a month old) and I accidentally add a repo that is no longer valid. I have tried several ways to remove it including:

su - yum remove ozonos (DID NOT WORK)

I have also tried; su - yum remove (DID NOT WORK)

Someone suggested that I try; su - ls -1 /etc/yum.repos.d vi /etc/yum.repos.d (but once in vi there is no file to edit - which I figured would be the case since it is not a text file)

At this point I am totally clueless on what to do next. Any help would be greatly appreciated. Thank you all in advance.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2015-07-24 10:04:43 -0500

aeperezt gravatar image

Best way is to edit the repo file that should be on /etc/yum.repo.d/fedy.repo and edit the line enable and set it to enabled=0 or add the line if it does not exist on the file. I do not know if fedy.repo is the correct name of the file to find the name of that file you can do this.

sudo grep goodies /etc/yum.repo.d/*

That will show the file that contain that domain.


sudo yum repolist

and see from the repo list the name of the repo.

Good luck

edit flag offensive delete link more

answered 2015-07-25 01:18:17 -0500

hedayat gravatar image

@aeperezt answer is correct (I've even voted that up), but this is an alternative solution which doesn't require editing files manually:

First, you should know the 'id' of the repository. It should be probably clear from the output of yum repolist (or dnf repolist). I assume ozonos from now. Now, you can disable the repository with the following command:

yum-config-manager --disable ozonos

or (dnf counterpart):

dnf config-manager --set-disabled ozonos

If you really doesn't need that repository, you can also remove the repository completely instead of disabling it. To do this, you should know the name of repository configuration file inside /etc/yum.repos.d/ directory (yes, this is a directory not a file). Then you can simply remove the repository configuration file (IF it doesn't contain any other repositories you need):

rm -f /etc/yum.repos.d/goodies.repo
edit flag offensive delete link more

answered 2015-07-24 23:26:19 -0500

Lêínfeva gravatar image

You also can use your file manager as root this way you can delete "the" repository from /etc/yum.repo.d

sudo dbus-launch nautilus //gnome
sudo dbus-launch caja //mate-desktop
sudo dbus-launch thunar // xfce
sudo dbus-launch pcmanfm //lxde

i think that dbus-lauch dolphin could work in KDE (i'm not sure)

i hope that can be useful for you.

regards :)

edit flag offensive delete link more

Question Tools


Asked: 2015-07-24 05:35:44 -0500

Seen: 24,126 times

Last updated: Jul 25 '15