List all installed packages:
dnf repoquery --installed
List packages selected by a user (but not automatically to meet dependenciy requirements):
dnf repoquery --userinstalled dnf history userinstalled
Check if a package is installed:
dnf list $PKG rpm --verify $PKG rpm -V $PKG
Check a package version:
dnf info $PKG
Check repository/origin availability:
dnf whatprovides $PKG
dnf repoquery -l $PKG rpm -ql $PKG
Using remote metadata:
dnf provides ifconfig dnf repoquery --file /usr/sbin/ifconfig
Using installed package DB:
rpm -qf /usr/bin/rpm
repoquery --requires --resolve $PKG
If you possess a actual RPM:
rpm -qpR $RPM
dnf repoquery --alldeps --whatrequires $PKG dnf repoquery --installed --whatrequires $PKG rpm -q --whatrequires $PKG
Streams group related package at specific compatible version. Only one version could be installed in system in time.
For example Node.js has lots of parallel versions:
bash# sudo dnf module list nodejs Name Stream Profiles Summary nodejs 10 [d] common [d], development, minimal, s2i Javascript runtime nodejs 12 common [d], development, minimal, s2i Javascript runtime nodejs 14 common [d], development, minimal, s2i Javascript runtime nodejs 16 common [d], development, minimal, s2i Javascript runtime nodejs 18 common [d], development, minimal, s2i Javascript runtime
You select specific stream:
sudo dnf module install nodejs:18
In order to change stream one need to remove all the packages from original stream and reset the stream:
sudo dnf module remove nodejs sudo dnf module reset nodejs sudo dnf module install nodejs:16