LinuxCommandLibrary

dnf4

TLDR

Upgrade all packages

$ sudo dnf4 upgrade
copy
Search for packages
$ dnf4 search [keyword1] [keyword2]
copy
Display package info
$ dnf4 info [package]
copy
Install packages
$ sudo dnf4 install [package1] [package2]
copy
Remove packages
$ sudo dnf4 remove [package1] [package2]
copy
List installed packages
$ dnf4 list --installed
copy
Find package providing a command
$ dnf4 provides [command]
copy
View history
$ dnf4 history
copy

SYNOPSIS

dnf4 command [options] [packages]

DESCRIPTION

dnf4 is the DNF version 4 package manager for RHEL 8/9 and older Fedora versions (pre-41). It's the successor to yum and manages RPM packages.
On Fedora 41+, dnf defaults to version 5. Use dnf4 explicitly for the older version.

PARAMETERS

upgrade

Upgrade installed packages
search keywords
Search package names and summaries
info package
Display package details
install packages
Install packages
remove packages
Remove packages
list
List packages
provides file
Find package owning file
history
View transaction history

CAVEATS

Legacy version, newer systems use dnf5. Command abbreviations supported (in, rm, se, etc.).

SEE ALSO

dnf(8), dnf5(8), rpm(8)

Copied to clipboard