Earlier today while responding to a comment in an older article I requested that the person leaving the comment provide information to show what repositories were enabled in YUM. I figured printing out the configured YUM repositories could be useful to others so below is an example command and example output to display what YUM repos are configured on a CentOS Linux server.
Display Enabled YUM Repositories On CentOS Linux:
- [root@dev ~]# yum repolist
- Loaded plugins: fastestmirror
- Determining fastest mirrors
- * addons: yum.singlehop.com
- * atomic: www4.atomicorp.com
- * base: mirror.san.fastserv.com
- * epel: mirror.utexas.edu
- * extras: yum.singlehop.com
- * rpmforge: ftp-stud.fht-esslingen.de
- * updates: mirror.rackspace.com
- addons | 951 B 00:00
- atomic | 1.9 kB 00:00
- atomic/primary_db | 443 kB 00:00
- base | 2.1 kB 00:00
- chl | 951 B 00:00
- epel | 3.7 kB 00:00
- epel/primary_db | 3.0 MB 00:01
- extras | 2.1 kB 00:00
- kbs-CentOS-Extras | 1.9 kB 00:00
- kbs-CentOS-Testing | 1.9 kB 00:00
- pgdg83 | 1.9 kB 00:00
- rpmforge | 1.1 kB 00:00
- rpmforge/primary | 2.2 MB 00:01
- rpmforge 10664/10664
- updates | 1.9 kB 00:00
- updates/primary_db | 907 kB 00:00
- repo id repo name status
- addons CentOS-5 - Addons enabled: 0
- atomic CentOS / Red Hat Enterprise Linux 5 - atomicrocketturtle.com enabled: 707
- base CentOS-5 - Base enabled: 2,599
- chl CHL Packages for Enterprise Linux 5 - i386 enabled: 215
- epel Extra Packages for Enterprise Linux 5 - i386 enabled: 5,214
- extras CentOS-5 - Extras enabled: 325
- kbs-CentOS-Extras CentOS.Karan.Org-EL5 - Stable enabled: 0
- kbs-CentOS-Testing CentOS.Karan.Org-EL5 - Testing enabled: 1,159
- pgdg83 PostgreSQL 8.3 5 - i386 enabled: 245
- rpmforge RHEL 5 - RPMforge.net - dag enabled: 10,664
- updates CentOS-5 - Updates enabled: 874
- repolist: 22,002
- [root@dev ~]#
Depending on the last time you used the yum command and how many repositories you have enabled it could take a couple minutes to build the repository list using the “yum repolist” command. The list of repositories includes the number of packages available in each repository such as rpmforge having almost half of the available packages. You can also see in the above output if the YUM(Yellowdog Updater Modified) repositories are enabled or disabled and in this example all of the repos are enabled.