Enable Disable Yum Repo List Fedora 11

 

Enable Disable Yum Repo List Fedora 11.

 

   The Linux command example below show how enable yum to use Fedora 11 DVD repo and disable all other yum repo that enable by default on Fedora 11 operating system.  This example on how to disable yum fedora repository list is made to make sure that you can use yum command to install package from Fedora 11 DVD.  Note:- You may not need to disable yum repolist on your Fedora 11, if you have internet connection on your Fedora system... if not you may get  error that say "Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again" when you try to execute yum command to install package from Fedora 11 DVD.

 

1.  Execute yum command below to check enable yum repo list on Fedora 11 system.

Check Enable Yum Repo List Fedora 11

[root@localhost ~]# yum repolist

Loaded plugins: refresh-packagekit

repo id       repo name                     status

fedora        Fedora 11 - i386              enabled: 13,289

fedora-dvd    Fedora-dvd 11 - i386          enabled:  2,252

updates       Fedora 11 - i386 - Updates    enabled:  4,263

repolist: 19,804

[root@localhost ~]#

 

2.  If your Fedora 11 not connected to the internet you may get yum error output same as show on example below when you try to execute the yum repolist command.

Fedora 11 yum Error Cannot retrieve repository metadata repomd.xml for repository fedora

[root@localhost ~]# yum repolist

Loaded plugins: refresh-packagekit

Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

[root@localhost ~]#

 

3.  To disable yum repo list on Fedora 11 you may need to open Fedora repo and fedora-updates.repo files inside /etc/yum.repos.d/ directory (except our fedora-dvd.repo that point to Fedora 11 DVD repo) and change the parameter inside the repo fedora.repo and fedora-updates.repo configuration file from enabled=1 to enabled=0 or just follow the command below to rename the repo configuration file and automatically disable them from being use as repository configuration for yum program.

 

Use ll command to list repo file inside /etc/yum.repos.d/ directory

Fedora 11 yum repository list

 

[root@localhost ~]# ll /etc/yum.repos.d/

total 20

-rw-r--r--. 1 root root  226 2009-08-18 19:12 fedora-dvd.repo

-rw-r--r--. 1 root root 1785 2009-05-11 18:45 fedora-rawhide.repo

-rw-r--r--. 1 root root 1144 2009-05-11 18:45 fedora.repo

-rw-r--r--. 1 root root 1105 2009-05-11 18:45 fedora-updates.repo

-rw-r--r--. 1 root root 1163 2009-05-11 18:45 fedora-updates-testing.repo

[root@localhost ~]#

 

Disable fedora.repo and fedora-updates.repo.

 

Use mv command to rename the fedora.repo and fedora-updates.repo to disable them from being use as yum repository configuration file.

Fedora 11 disable fedora.repo disable fedora-updates.repo

[root@localhost ~]# mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.disable

[root@localhost ~]# mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.disable

[root@localhost ~]#

 

Note: To enable yum repolist back to the original state again just reverse the mv/rename process.

 

Use ll comand to list and recheck the configuration files.

Check Fedora 11 yum repo list

[root@localhost ~]# ll /etc/yum.repos.d/

total 20

-rw-r--r--. 1 root root  226 2009-08-18 19:12 fedora-dvd.repo

-rw-r--r--. 1 root root 1785 2009-05-11 18:45 fedora-rawhide.repo

-rw-r--r--. 1 root root 1144 2009-05-11 18:45 fedora.repo.disable

-rw-r--r--. 1 root root 1105 2009-05-11 18:45 fedora-updates.repo.disable

-rw-r--r--. 1 root root 1163 2009-05-11 18:45 fedora-updates-testing.repo

[root@localhost ~]#

 

Check yum repo list again by issuing yum repolist command as show on example below, proceed with Fedora 11 package installation from Fedora 11 dvd if you get the output same as shown on examle below... if not... recheck yum configuration file again...

Fedora 11 DVD repo ready to install package from Fedora 11 DVD

[root@localhost ~]# yum repolist

Loaded plugins: refresh-packagekit

repo id          repo name                   status

fedora-dvd       Fedora-dvd 11 - i386        enabled: 2,252

repolist: 2,252

[root@localhost ~]#

 

Best practice:  Clear yum cache using yum clean all command as show below before you start install software package from Fedora 11 DVD as installation source.  This little procedure just want to make sure you have new trouble free yum cache :-).

Clean all yum cache on Fedora 11

[root@localhost ~]# yum clean all

Loaded plugins: refresh-packagekit

Cleaning up Everything

[root@localhost ~]#

 

Keywords: disable yum repo, disable repo list, enable fedora 11 dvd repo, disable fedora.repo, disable fedora-updates.repo, fedora 11 dvd repo, fedora 11 repolist, yum fedora 11

 

1 comment

23
Aug

Disable repo yum-config-manager

ADDITIONAL information where... you could use yum-config-manager to disable repo

1. List Fedora repo
[root@localhost ~]# yum repolist
Loaded plugins: refresh-packagekit
repo id repo name status
fedora Fedora 11 - i386 enabled: 13,289
fedora-dvd Fedora-dvd 11 - i386 enabled: 2,252
updates Fedora 11 - i386 - Updates enabled: 4,263
repolist: 19,804

[root@localhost ~]#

To disable repo on Fedora you also could use yum-config-manager to enable repo or disable repo.
example:
DISABLE REPO:
yum-config-manager --disable fedora
yum-config-manager --disable updates

CLEAR CACHE:
yum clean all

to ENABLE REPO back where it use to be... just execute below command

yum-config-manager --enable fedora
yum-config-manager --enable updates

aaaaaaaaaaa