Skip to content

DNF Command Reference

Useful commands for Fedora’s DNF package manager.

Tested on: Fedora 44 KDE Plasma

Core Package Management

Install software.

dnf install

Remove (uninstall) software.

dnf remove

Upgrade software.

dnf upgrade

Downgrade software.

dnf downgrade

Reinstall software.

dnf reinstall

Remove software and install another in one transaction.

dnf swap

Remove all unneeded packages originally installed as dependencies.

dnf autoremove

Install build dependencies for a package or spec file.

dnf builddep

Install debuginfo packages.

dnf debuginfo-install

Change the reason for an installed package.

dnf mark

Search and Information

Search for software matching all specified strings.

dnf search

List packages depending on their relation to the system with additional details.

dnf info

List packages depending on their relation to the system.

dnf list

Find what package provides the given value.

dnf provides

Search for packages matching various criteria.

dnf repoquery

List groups of installed packages not required by other installed packages.

dnf leaves

Show package changelogs.

dnf changelog

Print a list of unresolved dependencies for repositories.

dnf repoclosure

System Updates and Upgrades

Check for available package upgrades.

dnf check-upgrade

Upgrade or downgrade installed software to the latest available versions.

dnf distro-sync

Prepare the system for an upgrade to a new release.

dnf system-upgrade

Determine whether the system or systemd services need restarting.

dnf needs-restarting

Offline Operations

Manage offline transactions.

dnf offline

Store an upgrade transaction to be performed offline.

dnf offline-upgrade

Store a distro-sync transaction to be performed offline.

dnf offline-distrosync

Repository and Configuration Management

Manage repositories.

dnf repo

Manage configuration.

dnf config-manager

Manage Copr repositories (add-ons provided by users/community/third-party).

dnf copr

Synchronize a remote DNF repository to a local directory.

dnf reposync

Manage a directory with repodata or with rpm packages.

dnf repomanage

Generate the metadata cache.

dnf makecache

Remove or expire cached data.

dnf clean

Transactions and History

Do transaction.

dnf do

Manage transaction history.

dnf history

Replay a transaction that was previously stored in a directory.

dnf replay

Group and Module Management

Manage comps groups.

dnf group

Manage comps environments.

dnf environment

Manage modules.

dnf module

Advanced Management

Manage advisories.

dnf advisory

Check for problems in the packagedb.

dnf check

Download software to the current directory.

dnf download

Manage versionlock configuration.

dnf versionlock

Common Aliases

Alias for check-upgrade.

dnf check-update

Alias for group.

dnf grp

Alias for repo info.

dnf repoinfo

Alias for repo list.

dnf repolist

Alias for advisory.

dnf updateinfo

Alias for upgrade --minimal.

dnf upgrade-minimal