DNF in a Nutshell
Here is a short overview of the more useful commands of DNF, the successor to the YUM package manager in Fedoraland.
DNF vs. YUM
"Dandified Yum", or DNF for short, is the successor to "Yellowdog Updater, Modified" (YUM), a package manager that harkens back to the days of Yellowdog Linux in 1999 and the original Yellowdog Updater, YUP. In today's Linux world, YUM and APT are the 200-pound gorillas for native package installs, with Snap, Appimages, and Flatpaks providing distribution-independent application deployment mechanisms. DNF is the new kid on that block.
The Short & Skinny on DNF
Luckily, DNF inherits a lot of YUM's functionality and usage patterns. Chances are, if it worked on YUM there is a way to do it with DNF.
Here is a short overview of the most commonly used commands:
dnf check-update
Check for updates in the configured package repositories and download the metadata.
dnf [-y] update
Download and install the available updates (optionally without asking any questions). You can also specify one or more packages to update only.
dnf install <packagename>
Install a package.
dnf remove <packagename>
Uninstall a package.
dnf search <string>
Search for packages with a name or description containing <string>
.
dnf provides <filename>
Displays package(s) - installed or otherwise - providing files matching <filename>
(which can include regular expressions; just be careful with quoting).
dnf history [<packagename> ...]
Display update history, optionally limited to a set of packages.
dnf updateinfo list <packagename>
Show the changelog entry for package named <packagename>
. Note this only works while the update isn't installed. After installation, use rpm -q --changelog <packagename>
to display the same information.
For more information, check out the links below.
Useful Links