CentOS / RHEL: List All Configured Repositories

by on February 25, 2013 · 1 comment· LAST UPDATED February 25, 2013

in , ,

How can display a list of configured repositories under CentOS / Fedora / Red Hat Enterprise / Scientific Linux server operating systems?

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
Requirementsyum
Estimated completion timeN/A

You need to pass the repolist option to the yum command. This option will show you a list of configured repositories under RHEL / Fedora / SL / CentOS Linux. The default is to list all enabled repositories. Pass -v (verbose mode) optionn for more information is listed.

Syntax

The syntax is:

 
yum repolist
yum [options] repolist [option]
yum -v repolist
 

Examples

Type the following command:
# yum -v repolist
# yum -v repolist | less
# yum repolist

Sample outputs:

Fig.01: Yum Query All Repositories and Show Repository ID's Command

Fig.01: Yum Query All Repositories and Show Repository ID's Command


To list only enabled repos, enter:
# yum repolist enabled
To list only disabled repos, enter:
# yum repolist disabled
To list all repos (default), enter:
# yum repolist all
To list available packages under a repo called ksplice-uptrack, enter:
# yum --disablerepo="*" --enablerepo="ksplice-uptrack" list available
Sample outputs:

Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Available Packages
ksplice-uptrack-release.noarch                           1-2                             ksplice-uptrack
python-ksplice-uptrack.noarch                            0.2.2-1.el6                     ksplice-uptrack
uptrack-PyYAML-debuginfo.x86_64                          3.08-4.el6                      ksplice-uptrack
uptrack-libyaml-debuginfo.x86_64                         0.1.3-1.el6                     ksplice-uptrack
uptrack-libyaml-devel.x86_64                             0.1.3-1.el6                     ksplice-uptrack
uptrack-python-cjson.x86_64                              1.0.5-5.el6                     ksplice-uptrack
uptrack-python-cjson-debuginfo.x86_64                    1.0.5-5.el6                     ksplice-uptrack

Where,

  1. --disablerepo="*" : Disables specific repositories by id or glob. In this example, disable all repos.
  2. --enablerepo="ksplice-uptrack" : Enable specific repositories by id or glob. In this example, enable a repo called ksplice-uptrack
See also
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Majid February 26, 2013 at 9:33 am

Thanks,really helpful

Reply

Leave a Comment

Tagged as: , , , ,

Previous Faq:

Next Faq: