CentOS 7 / RHEL 7: YUM Listing Packages Information For All Installed And Available Packages

For A Linux newbie administrator, how to check package information for which packages  installed and available on your linux system? How do I list one installed package information  under centos  operating system? How do I list information for one available package  in the YUM repository? this post will guide you how to:

#1 YUM Listing Package for all installed and available package

#2 YUM Listing Package only for installed packages

#3 YUM Listing Package only for all available packages

#4 YUM Listing Package For packages that matching particular regular expression

CentOS 7 YUM Listing Package for all installed and available package

To check pacakges information for all installed packages and all available packages isn’t be installed  on your system, issue the following command:

yum list all

Outputs:

[root@devops Desktop]# yum list all

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.nwsuaf.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

Installed Packages

GConf2.x86_64                           3.2.6-8.el7                    @anaconda

LibRaw.x86_64                           0.14.8-5.el7.20120830git98d925 @anaconda

ModemManager.x86_64                     1.1.0-6.git20130913.el7        @anaconda

ModemManager-glib.x86_64                1.1.0-6.git20130913.el7        @anaconda

NetworkManager.x86_64                   1:0.9.9.1-13.git20140326.4dba720.el7

...

Available Packages

389-ds-base.x86_64                      1.3.1.6-26.el7_0               updates

389-ds-base-devel.x86_64                1.3.1.6-26.el7_0               updates

389-ds-base-libs.x86_64                 1.3.1.6-26.el7_0               updates

Cython.x86_64                           0.19-3.el7                     base

ElectricFence.i686                      2.2.2-39.el7                   base

ElectricFence.x86_64                    2.2.2-39.el7                   base

GConf2.i686                             3.2.6-8.el7                    base

..

To check how many installed and available packages, issue the following command:

yum list all | wc -l

Outpus:

[root@devops Desktop]# yum list all | wc -l

8910

CentOS 7 YUM Listing Package only for installed packages 

If you just want to list installed packages and its information on your system, run “yum list installed” command in command line interface:

yum list installed

Outputs:

[root@devops Desktop]# yum list installed

Loaded plugins: fastestmirror, langpacks

Installed Packages

GConf2.x86_64                          3.2.6-8.el7                     @anaconda

LibRaw.x86_64                          0.14.8-5.el7.20120830git98d925  @anaconda

ModemManager.x86_64                    1.1.0-6.git20130913.el7         @anaconda

ModemManager-glib.x86_64               1.1.0-6.git20130913.el7         @anaconda

NetworkManager.x86_64                  1:0.9.9.1-13.git20140326.4dba720.el7

@anaconda

NetworkManager-glib.x86_64             1:0.9.9.1-13.git20140326.4dba720.el7

@anaconda

NetworkManager-libreswan.x86_64        0.9.8.0-5.el7                   @anaconda

combining with "grep" command to search a paritcal package:

[root@devops Desktop]# yum list installed | grep wget

wget.x86_64                            1.14-10.el7_0.1                 @updates

[root@devops Desktop]#

CentOS 7 YUM Listing Package only for all available packages

To list all packages in the yum repositories available to be installed, you can run the following command:

yum list available

Outputs:

[root@devops Desktop]# yum list available | more

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.nwsuaf.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

Available Packages

389-ds-base.x86_64                       1.3.1.6-26.el7_0                updates

389-ds-base-devel.x86_64                 1.3.1.6-26.el7_0                updates

389-ds-base-libs.x86_64                  1.3.1.6-26.el7_0                updates

Cython.x86_64                            0.19-3.el7                      base

ElectricFence.i686                       2.2.2-39.el7                    base

ElectricFence.x86_64                     2.2.2-39.el7                    base

GConf2.i686                              3.2.6-8.el7                     base

GConf2-devel.i686                        3.2.6-8.el7                     base

...

Using global expression as argument is a good choice to list all available packages that matching the name in the yum repositories. issue the following command

yum list available [glob_expl]

Example: list all available packages mathing “geo*” in the yum repositories

[root@devops Desktop]# yum list available geo*

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.nwsuaf.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

Available Packages

GeoIP.i686                                           1.5.0-9.el7                                  base

GeoIP.x86_64                                         1.5.0-9.el7                                  base

GeoIP-devel.i686                                     1.5.0-9.el7                                  base

GeoIP-devel.x86_64                                   1.5.0-9.el7                                  base

GeoIP-update.noarch                                  1.5.0-9.el7                                  base

geoclue.i686                                         0.12.99-7.el7                                base

geoclue-devel.i686                                   0.12.99-7.el7                                base

geoclue-devel.x86_64                                 0.12.99-7.el7                                base

geoclue-doc.noarch                                   0.12.99-7.el7                                base

geoclue-gsmloc.x86_64                                0.12.99-7.el7                                base

geoclue-gui.x86_64                                   0.12.99-7.el7                                base

[root@devops Desktop]#

YUM Listing Package For packages that matching particular regular expression 

To list all available packages in the repositories and all installed packages on your system that matching a particular pattern, using global expression as argument.

yum list [glob_exp]

Example:List all intalled and available packages that matching “wge*” or “http*” pattern.

[root@devops Desktop]# yum list wge* http*

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.nwsuaf.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

Installed Packages

wget.x86_64                                            1.14-10.el7_0.1                        @updates

Available Packages

httpcomponents-client.noarch                           4.2.5-5.el7_0                          updates

httpcomponents-client-javadoc.noarch                   4.2.5-5.el7_0                          updates

httpcomponents-core.noarch                             4.2.4-6.el7                            base

httpcomponents-core-javadoc.noarch                     4.2.4-6.el7                            base

httpcomponents-project.noarch                          6-4.el7                                base

httpd.x86_64                                           2.4.6-18.el7.centos                    updates

httpd-devel.x86_64                                     2.4.6-18.el7.centos                    updates

httpd-manual.noarch                                    2.4.6-18.el7.centos                    updates

httpd-tools.x86_64                                     2.4.6-18.el7.centos                    updates

httpunit.noarch                                        1.7-15.el7                             base

httpunit-doc.noarch                                    1.7-15.el7                             base

httpunit-javadoc.noarch                                1.7-15.el7                             base

 

You might also like:

Sidebar



back to top