`yum`/`dnf`/`rpm` equivalent to `dpkg -l` for RHEL/CentOS?
Is there an equivalent yum
, dnf
, or rpm
command to Debian/Ubuntu's dpkg -l
command to list both package names and installation status?
yum list packagename
this will return a list of installed packages, then a list of available/not installed
For example
[root@RHELPOC ~]# yum list systemd
Updating Subscription Management repositories.
Last metadata expiration check: 1:42:23 ago on Fri 08 Jan 2021 16:47:42 GMT.
Installed Packages
systemd.x86_64 239-41.el8_3 @rhel-8-for-x86_64-baseos-rpms
Available Packages
systemd.i686 239-41.el8_3.1 rhel-8-for-x86_64-baseos-rpms
systemd.x86_64 239-41.el8_3.1 rhel-8-for-x86_64-baseos-rpms
dpkg -l
is equivalent to rpm -qa