Original address: http://www.if-not-true-then-false.com/2010/yum-remove-repo-repository-yum-disable-repo-repository/
Quick Guide, howto Remove and disable YUM repo (repository). Yum command itself does not contain any way to remove the repository. YUM repo The files is located in/etc/yum.repos.d/directory.
I Use the Kde.repo file with following content as example on this guide:
[KDE]
Name=kde
mirrorlist=http://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable
gpgkey=http:// Apt.kde-redhat.org/apt/kde-redhat/kde-redhat. Rpm-gpg-key
enabled=1 |
Remove YUM Repo (Repository) permanently
Before moving repository permanently is a good idea to check this is the repository installed using RPM package. As many repos usually are, like rpm-fusion, Livna, etc. Search Repository rpm-package with following command:
Rpm-qa | grep -I. repo-name |
Example:
Rpm-qa | grep -i rpmfusion
rpmfusion-nonfree-release-13-2.noarch
rpmfusion-free-release-13-2.noarch
# # OR # #
Rpm-qa | grep -i livna
livna-release-1-1.noarch |
If Rpm-package found then simply remove whole rpm-package with following command:
Rpm-e Some-repository-rpm-package |
Example:
Rpm-e Livna-release-1-1.noarch |
If rpm-package not found then simply remove repo file with following command:
rm /etc/yum.repos.d/repo-file.repo
# OR Just rename it (without repo file extension) # #
mv/etc/yum.repos.d/repo-file.repo/etc/yum.repos.d/repo-file.repo.bak |
Example:
rm /etc/yum.repos.d/kde.repo
# OR Just rename it (without repo file extension) # #
MV / Etc/yum.repos.d/kde.repo/etc/yum.repos.d/kde.repo.bak |
Disable YUM Repo (Repository)
Disable YUM Repo
Edit repo file On/etc/yum.repos.d/as root and change enabled to 0
# # change
enabled=1
# to
enabled=0 |
Example:
# change
[KDE]
name=kde
mirrorlist=http://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable
Gpgkey=http://apt.kde-redhat.org/apt/kde-redhat/kde-redhat. Rpm-gpg-key
enabled=1
# to
[KDE]
name=kde
mirrorlist=http://apt.kde-redhat.org/ Apt/kde-redhat/fedora/mirrors-stable
Gpgkey=http://apt.kde-redhat.org/apt/kde-redhat/kde-redhat. Rpm-gpg-key
enabled=0 |
Enable disabled repo quickly with YUM: