yum search $pkg
All packages:
yum list all
Installed only:
yum list installed
Obsolete:
yum list obsoletes
With updates available:
yum list updates
List packages from specific repository only:
dnf --disablerepo="*" --enablerepo=epel list available
yum info vim
List installed package versions:
rpm -q kernel
List package files:
rpm -ql bash
Show package dependencies:
yum deplist vim
Among installed packages:
rpm -qf /etc/passwd rpm -q --whatprovides /etc/passwd
Search in the repository indices (includes uninstalled packages too + pattern matching):
yum whatprovides '*passwd' yum provides /etc/yum.repos.d/epel.repo yum provides /etc/yum.repos.d/epel.repo --enablerepo=*