YUM – List all avialable packages from a given repository – Fedora/Centos/Rhel

Published on Author gryzliLeave a comment

1. Get the repository ID

This is sample repolist on Centos/RHEL 7.X

[root@provision-test ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: mirror1.34sp.com
 * base: mirrors.neterra.net
 * extras: mirrors.neterra.net
 * updates: mirrors.neterra.net
repo id           repo name                                     status
atomic/7/x86_64    CentOS / Red Hat Enterprise Linux 7 - atomicrocketturtle.com                                                                                843
base/7/x86_64      CentOS-7 - Base                                                                                                                           8,465
extras/7/x86_64    CentOS-7 - Extras                                                                                                                           104
updates/7/x86_64   CentOS-7 - Updates                                                                                                                        1,725
repolist: 11,137

 

The repo ID for Atomic repo is: “atomic

This is sample repolist on Centos/RHEL 6.X

[root@provision-test ~]# yum repolist
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.neterra.net
 * epel: mirrors.neterra.net
 * extras: mirrors.neterra.net
 * updates: mirrors.neterra.net
repo id             repo name                                                status
Webmin              Webmin Distribution Neutral                                 210
base                CentOS-6 - Base                                           6,518
epel                Extra Packages for Enterprise Linux 6 - x86_64           11,324
extras              CentOS-6 - Extras                                            37
updates             CentOS-6 - Updates                                          836
repolist: 18,925

 

The repo ID for Webmin is: “Webmin” 

 

2. List all available packages from a given repository

List all packages for repo: Webmin

[root@provision-test ~]# yum --disablerepo="*" --enablerepo="Webmin" list available
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
usermin.noarch 1.650-1 Webmin
usermin-webmail.noarch 1.651-1 Webmin
webmin.noarch 1.740-1 Webmin

 

Leave a Reply

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