LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dnf

Fedora/RHEL package manager

TLDR

Apply all available updates
$ sudo dnf upgrade
copy
See what would be updated, without touching anything
$ dnf check-upgrade
copy
Install packages, answering yes to prompts
$ sudo dnf install --assumeyes [package1] [package2]
copy
Search names and summaries
$ dnf search [keyword]
copy
Show a package's details
$ dnf info [package]
copy
Find what provides a file or command
$ dnf provides [/usr/bin/ss]
copy
List the installed packages
$ dnf list --installed
copy
Ask which packages require a given one
$ dnf repoquery --whatrequires [package]
copy
List the files a package ships, without installing it
$ dnf repoquery --list [package]
copy
Install a package group
$ sudo dnf group install "[Development Tools]"
copy
Remove a package
$ sudo dnf remove [package]
copy
Remove leaf packages that nothing needs any more
$ sudo dnf autoremove
copy
Review the transaction history
$ dnf history
copy
Undo a past transaction
$ sudo dnf history undo [12]
copy
Download a package without installing it
$ dnf download [package]
copy
Empty the caches
$ sudo dnf clean all
copy

SYNOPSIS

dnf [options] command [arguments]

DESCRIPTION

dnf (Dandified YUM) is the package manager for Fedora, RHEL, and related distributions. It has been the default since Fedora 22, with DNF5 becoming the default in Fedora 41+. It is the successor to YUM and provides improved dependency resolution, performance, and a more consistent interface.

PARAMETERS

install, in package

Install specified packages
remove, rm package
Remove specified packages
upgrade, up
Upgrade all installed packages
search, se keyword
Search for packages matching keyword
info, if package
Display detailed information about a package
list, ls
List packages (--installed, --available, --updates)
provides command
Find packages providing a file or command
clean option
Clean cached data (all, dbcache, expire-cache, metadata, packages)
repolist
Display configured repositories
history
View transaction history
autoremove
Remove unneeded packages
-y, --assumeyes
Automatically answer yes to prompts
--refresh
Set metadata as expired before running command

CONFIGURATION

/etc/dnf/dnf.conf

Main DNF configuration file with settings for package management behavior.
**/etc/yum.repos.d/*.repo**
Repository configuration files defining package sources.

INSTALL

sudo pacman -S dnf
copy

CAVEATS

DNF5 (used in Fedora 41+) has some differences from earlier DNF versions. Check documentation for specific version differences.

HISTORY

DNF was introduced in Fedora 18 as an experimental package manager and became the default in Fedora 22. DNF5 is a complete rewrite released with Fedora 41.

SEE ALSO

yum(8), rpm(8), apt(8), pacman(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid