OSETC TECH

CentOS 7 /RHEL 7: How To List Yum Repositories Information

In this post you will see that how to list all configured repositories under CentOS 7/ RHEL 7/Fedora system. How to display more detailed information for all enabled or disabled repositories? How to list only enabled repositories in your system? How to list only disabled repositories under linux operating system?

​CentOS Listing Repositories 

If you want to list all configured repositories  in your system, run the following “yum repolist” command. the default is to list all enabled repositories.

[root@itsprite Desktop]# yum repolist

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirrors.btte.net

 * extras: mirrors.btte.net

 * updates: mirrors.btte.net

repo id                             repo name                             status

!base/7/x86_64                      CentOS-7 - Base                       8,465

!extras/7/x86_64                    CentOS-7 - Extras                        77

!updates/7/x86_64                   CentOS-7 - Updates                    1,370

repolist: 9,912

[root@itsprite Desktop]#

If you want to list more information about those configured repositories on your system,  just pass “-v” option , then more detailed information is listed.

[root@itsprite Desktop]# yum repolist -v

Loading "fastestmirror" plugin

Loading "langpacks" plugin

Adding en_US to language list

Config time: 0.019

Yum version: 3.4.3

Loading mirror speeds from cached hostfile

 * base: mirrors.nwsuaf.edu.cn

 * extras: mirrors.nwsuaf.edu.cn

 * updates: mirrors.btte.net

Setting up Package Sacks

pkgsack time: 0.011

Repo-id      : base/7/x86_64

Repo-name    : CentOS-7 - Base

Repo-revision: 1404489580

Repo-updated : Fri Jul  4 12:01:07 2014

Repo-pkgs    : 8,465

Repo-size    : 5.8 G

Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os

Repo-baseurl : http://mirrors.nwsuaf.edu.cn/centos/7.0.1406/os/x86_64/ (9 more)

Repo-expire  : 21,600 second(s) (last: Tue Dec  9 08:23:01 2014)

Repo-filename: ///etc/yum.repos.d/CentOS-Base.repo

Repo-id      : extras/7/x86_64

Repo-name    : CentOS-7 - Extras

Repo-revision: 1415311115

Repo-updated : Thu Nov  6 16:58:54 2014

Repo-pkgs    : 77

Repo-size    : 212 M

Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras

Repo-baseurl : http://mirrors.nwsuaf.edu.cn/centos/7.0.1406/extras/x86_64/ (9

             : more)

Repo-expire  : 21,600 second(s) (last: Tue Dec  9 08:23:01 2014)

Repo-filename: ///etc/yum.repos.d/CentOS-Base.repo

Repo-id      : updates/7/x86_64

Repo-name    : CentOS-7 - Updates

Repo-revision: 1418045257

Repo-updated : Mon Dec  8 08:29:03 2014

Repo-pkgs    : 1,370

Repo-size    : 3.0 G

Repo-mirrors : http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates

Repo-baseurl : http://mirrors.btte.net/centos/7.0.1406/updates/x86_64/ (9 more)

Repo-expire  : 21,600 second(s) (last: Tue Dec  9 08:23:01 2014)

Repo-filename: ///etc/yum.repos.d/CentOS-Base.repo

repolist: 9,912

To List only enabled repositories, issue the following command:

yum repolist enabled

the outputs of this command are same as with “yum repolist”.

To List only diabled repositories, issue the following command:

yum repolist disabled

Outputs:

[root@itsprite Desktop]# yum repolist disabled

Loaded plugins: fastestmirror, langpacks

repo id                              repo name                                  

base-source/7                        CentOS-7 - Base Sources                    

centosplus/7/x86_64                  CentOS-7 - Plus                            

centosplus-source/7                  CentOS-7 - Plus Sources                    

debug/x86_64                         CentOS-7 - Debuginfo                       

extras-source/7                      CentOS-7 - Extras Sources                  

updates-source/7                     CentOS-7 - Updates Sources                 

repolist: 0

[root@itsprite Desktop]#

To list all enabled and disabled repositories, issue the following command:

[root@itsprite Desktop]# yum repolist all

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirrors.nwsuaf.edu.cn

 * extras: mirrors.nwsuaf.edu.cn

 * updates: mirrors.btte.net

repo id                      repo name                            status

!base/7/x86_64               CentOS-7 - Base                      enabled: 8,465

base-source/7                CentOS-7 - Base Sources              disabled

centosplus/7/x86_64          CentOS-7 - Plus                      disabled

centosplus-source/7          CentOS-7 - Plus Sources              disabled

debug/x86_64                 CentOS-7 - Debuginfo                 disabled

!extras/7/x86_64             CentOS-7 - Extras                    enabled:    77

extras-source/7              CentOS-7 - Extras Sources            disabled

!updates/7/x86_64            CentOS-7 - Updates                   enabled: 1,370

updates-source/7             CentOS-7 - Updates Sources           disabled

repolist: 9,912

[root@itsprite Desktop]#

See Also: