yum – List Installed Packages

unix-tutorial

CentOS and RedHat Linux are still the majority of my Linux servers and so now and then I have a RedHat specific question to investigate. This time around, I’ve explored getting the list of installed packages using yum command.

yum list installed

As hard as it may be to believe it, the actual command I needed is this:

[greys@rhel8 ~]$ yum list installed

That’s right – type it word for word and yum will report the full list of packages installed in your system along with package versions and package group names.

Here’s what Red Hat Enterprise Linux 8 beta VM reports:

[greys@rhel8 ~]$ yum list installed | more
Not root, Subscription Management repositories not updated
2018-10-28 13:33:38,137 [WARNING] yum:31323:MainThread @logutil.py:141 - logging already initialized
Not root, Subscription Management repositories not updated
Installed Packages
GConf2.x86_64 3.2.6-22.el8 @rhel-8-for-x86_64-appstream-beta-rpms
ModemManager.x86_64 1.8.0-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
ModemManager-glib.x86_64 1.8.0-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager.x86_64 1:1.14.0-5.el8 @anaconda
NetworkManager-adsl.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-bluetooth.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-libnm.x86_64 1:1.14.0-5.el8 @anaconda
NetworkManager-ovs.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-team.x86_64 1:1.14.0-5.el8 @anaconda
NetworkManager-tui.x86_64 1:1.14.0-5.el8 @anaconda
NetworkManager-wifi.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-wwan.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
PackageKit.x86_64 1.1.10-6.el8 @rhel-8-for-x86_64-appstream-beta-rpms
PackageKit-command-not-found.x86_64 1.1.10-6.el8 @rhel-8-for-x86_64-appstream-beta-rpms
PackageKit-glib.x86_64 1.1.10-6.el8 @rhel-8-for-x86_64-appstream-beta-rpms
PackageKit-gstreamer-plugin.x86_64 1.1.10-6.el8 @rhel-8-for-x86_64-appstream-beta-rpms
PackageKit-gtk3-module.x86_64 1.1.10-6.el8 @rhel-8-for-x86_64-appstream-beta-rpms
abattis-cantarell-fonts.noarch 0.0.25-4.el8 @rhel-8-for-x86_64-appstream-beta-rpms
accountsservice.x86_64 0.6.50-5.el8 @rhel-8-for-x86_64-appstream-beta-rpms
accountsservice-libs.x86_64 0.6.50-5.el8 @rhel-8-for-x86_64-appstream-beta-rpms
acl.x86_64 2.2.53-1.el8 @anaconda
adcli.x86_64 0.8.2-2.el8 @rhel-8-for-x86_64-baseos-beta-rpms
adobe-mappings-cmap.noarch 20171205-3.el8 @rhel-8-for-x86_64-appstream-beta-rpms
adobe-mappings-cmap-deprecated.noarch 20171205-3.el8 @rhel-8-for-x86_64-appstream-beta-rpms
...

Grep yum list installed using group name

The output makes is very easy to grep for packages that belong to the same software group, like rhel-8-for-x86_64-baseos-beta-rpms in this example:

[greys@rhel8 ~]$ yum list installed | grep rhel-8-for-x86_64-baseos-beta-rpms | more
2018-10-28 13:40:14,740 [WARNING] yum:31405:MainThread @logutil.py:141 - logging already initialized
ModemManager.x86_64 1.8.0-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
ModemManager-glib.x86_64 1.8.0-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-adsl.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-bluetooth.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-ovs.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-wifi.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
NetworkManager-wwan.x86_64 1:1.14.0-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
adcli.x86_64 0.8.2-2.el8 @rhel-8-for-x86_64-baseos-beta-rpms
at.x86_64 3.1.20-11.el8 @rhel-8-for-x86_64-baseos-beta-rpms
attr.x86_64 2.4.48-3.el8 @rhel-8-for-x86_64-baseos-beta-rpms
augeas-libs.x86_64 1.10.1-3.el8 @rhel-8-for-x86_64-baseos-beta-rpms
avahi.x86_64 0.7-18.el8 @rhel-8-for-x86_64-baseos-beta-rpms
avahi-glib.x86_64 0.7-18.el8 @rhel-8-for-x86_64-baseos-beta-rpms
avahi-libs.x86_64 0.7-18.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bash-completion.noarch 1:2.7-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bc.x86_64 1.07.1-5.el8 @rhel-8-for-x86_64-baseos-beta-rpms
binutils.x86_64 2.30-49.el8 @rhel-8-for-x86_64-baseos-beta-rpms
blktrace.x86_64 1.2.0-9.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bluez.x86_64 5.50-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bluez-libs.x86_64 5.50-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bluez-obexd.x86_64 5.50-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bolt.x86_64 0.4-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bpftool.x86_64 4.18.0-32.el8 @rhel-8-for-x86_64-baseos-beta-rpms
bubblewrap.x86_64 0.3.0-1.el8 @rhel-8-for-x86_64-baseos-beta-rpms

That’s it for today!

See Also