CentOS / RHEL: List All Configured Repositories

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
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.

ADVERTISEMENTS

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
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • Majid Feb 26, 2013 @ 9:33

    Thanks,really helpful

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.