CentosCommandsLinux

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?

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:

 Yum Query All Repositories and Show Repository ID's Command
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

 

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button