Fedora, CentOS, RHEL, and rpm-based Linux distributions use the yum command in order to manage packages. Even the dnf command is provided as the next version of the yum command the yum command is popularly used too. As a package manager packages are stored in repositories to download, install and update. The yum command provides the “yum repolist” command to list repositories. In this tutorial, we will examine how to list yum repositories, enabled repositories, disabled repositories.
yum repolist all- List All Installed Repositories
The “yum repolist all” command list all installed repositories. These repositories are currently enabled and disabled repositories. We can see that also the status column is listed which shows the repository status whether it is enabled or disabled.
yum repolist all
yum repolist – List Enabled Repositories
The “yum repolist” command can be used to list installed and enabled repositories. Repositories can be installed but not enabled for different reasons like duplicate packages, different packages providers etc.
We can see that currently enabled repositories are listed line by line. This information provides the repository id and repository name.
repo id repo name appstream CentOS Linux 8 - AppStream baseos CentOS Linux 8 - BaseOS epel Extra Packages for Enterprise Linux 8 - x86_64 epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 extras CentOS Linux 8 - Extras
yum repolist disabled – List Disabled Repositories
We may also need to display or list disabled yum repositories. The “yum repolist disabled” command can be used to list disabled repositories.
yum repolist disabled
List Repositories via /etc/yum.repos.d
The yum repository configuration is stored under the /etc/yum.repos.d directory. This directory contains multiple files where every file is a repository configuration. This repository configuration contains wheter repository is enabled or disabled. All the repository configuration can be listed with the ls command.