dnf#

Query repos and rpm db#

List repositories verbosely:

dnf repolist -v

List all available packages from all repos:

dnf repoquery

List all installed packages:

dnf list installed

List all installed packages and packages available for installation:

dnf list

List all available updates:

dnf list updates

Install packages#

Install a package:

dnf install package

Install a package from an RPM:

dnf localinstall /path/to/rpm

Update a package:

dnf update package

Package info#

View information about a package:

dnf info package

Removing packages#

Remove a package and it's dependencies:

dnf remove package

System Updates#

Update all packages (aka system update):

dnf -y update

Identifying security updates#

dnf updateinfo --security                              # Show summary of security updates
dnf updateinfo list updates security                   # list available security updates/advisories
dnf updateinfo list updates security | grep Important  # Show only "Important" RHSAs
dnf updateinfo list security --installed               # list installed security updates/advisories
dnf updateinfo list --cve CVE-2023-38408               # Identify packages required to resolve specific CVE
dnf updateinfo info RHSA-2023:4412                     # show info about a specific advisory

NOTE: Requires a valid/attached red hat subscription

Installing security updates#

dnf update --advisory=RHSA-2023:3722  # Install security update for specific RHSA
dnf update --security                 # Install all security updates