CentOS / RHEL: List All Configured Repositories

September 8, 2019

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

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.


The syntax is:

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


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

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


  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

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Article Tags:
Article Categories:
How To

Comments are closed.