Skip to content

Instantly share code, notes, and snippets.

@vyspiansky
Created February 1, 2023 10:33
Show Gist options
  • Save vyspiansky/ee5b7498b9f916504c165c61bdfa8718 to your computer and use it in GitHub Desktop.
Save vyspiansky/ee5b7498b9f916504c165c61bdfa8718 to your computer and use it in GitHub Desktop.
DNF (Dandified YUM) snippets

DNF (Dandified YUM)

To generate a list of installed packages

sudo dnf list installed | cat -n

Suppose you want to see all packages that start with x

# dnf list installed "x*"

? matches any single character.

# dnf list installed "t?r"

Available packages

To list the available packages for installation

sudo dnf list available | cat -n
dnf -v info <package>

To view all versions of a package in your enabled repositories, use:

dnf --showduplicates list kpartx

Install specific name-version

To install a specific name-version

dnf update kpartx-0.8.4-22.el8_6.2
dnf upgrade kpartx
dnf -y install kpartx-0.8.4-22.el8_6.2

Installed Package History

Get the History of an Installed Package

dnf history list <package_name>
dnf history info <history_id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment