CentOS / RHEL: List All Configured Repositories

In CentOS and RHEL, you can list all configured repositories using the yum command-line tool.

Here’s the command to list all the repositories:

yum repolist all

Explanation:

  • The yum command is used to interact with the YUM (Yellowdog Updater, Modified) package manager, which is used to manage software packages on CentOS and RHEL systems.
  • The repolist subcommand is used to list the available repositories, and the all option is used to show both enabled and disabled repositories.

The output of the command will show a list of all the repositories, including their name, status (enabled or disabled), number of packages, and repository ID.

Here’s an example of the output:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.net.in
* extras: centos.mirror.net.in
* updates: centos.mirror.net.in
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,591
extras/7/x86_64 CentOS-7 - Extras 463
updates/7/x86_64 CentOS-7 - Updates 721
repolist: 11,775

Explanation:

  • The output shows the names of the repositories (e.g., CentOS-7 - Base), their status (enabled or disabled), and the number of packages available in each repository.
  • The repolist line shows the total number of packages available from all the repositories.

Leave a Comment