Show Menu

DNF Cheat Sheet by

dnf

Overview

/etc­/dn­f/d­nf.c­onf DNF config­uration file
/etc­/yu­m.r­epo­s.d all repo files

List

dnf list --all list all installed and available packages
dnf list expre­ssi­on list packages matching expre­ssion
dnf list --inst­alled expre­ssi­on list installed packges matching expre­ssion
dnf list --avai­lable expre­ssi­on list available packages matching expre­ssion
dnf list --extras expre­ssi­on list extras packages matching expre­ssion
dnf list --obso­letes expre­ssi­on list obsoletes packages matching expre­ssion
dnf list --recent expre­ssi­on list recent packages matching expre­ssion
dnf list --upgrades expre­ssi­on list upgrades available for packges matching expre­ssion
dnf list --auto­rem­ove list orphaned packages

Info

dnf info packa­ge_­name show info of packa­ge_­name
dnf provides path/­to/­file show which package provides /path­/to­/file

Search

dnf search term search for term in package name and summary

Download

dnf install dnf-pl­ugi­ns-­core install dnf core plugins
dnf download packa­ge download package
 

Install

dnf install packa­ge_­name install package and depend­encies
dnf install /path­/to­/lo­cal­/rpm install local package and depend­encies
dnf install /path­/to­/fi­le install package which provides /path­/to­/file
dnf reinstall packa­ge_­name reinstall package and depend­encies
dnf downgrade packa­ge_­name downgrade package
dnf mark install packa­ge_­name marks the specified packages as installed by user.
dnf unmark remove packa­ge_­name unmarks the specified packages as installed by user
dnf mark group packa­ge_­name marks the specified packages as installed by group

History

dnf history list list dnf transa­ctions history
dnf history info trans­act­ion show info of particular trans­action
dnf history redo trans­act­ion redo particular trans­action
dnf history rollback trans­act­ion rollback particular trans­action
dnf history undo trans­act­ion undo particular trans­action
dnf history userin­sta­lled show all instal­lonly packages, packages installed outside of DNF and packages not installed as dependency

Update

dnf check-­upd­ate check if updates available
dnf upgrade update packages to latest version
dnf upgrad­e-m­ini­mal update packages to major patchset and security
dnf distro­-sync update packages to latest version
 

Repository

dnf repolist --ena­ble­d--­dis­abl­ed­|-­-all lists enabled, disabled or all known reposi­tories
dnf repoqu­ery searches the available DNF reposi­tories for selected packages
dnf reposi­tor­y-p­ack­ages run commands on top of all packages in the repository
dnf config­-ma­nager --add-­rep­o=­URL add remote repository

Group

dnf group summary group show overview of how many groups are installed and available
dnf group info group show package lists of a group
dnf group install --with­-op­tional group install packages the group contains
dnf group list group list all matching group
dnf group remove group remove those packages in the group
dnf group upgrade group upgrades the packages from the group and upgrades the group itself

Uninstall

dnf remove packa­ge_­name uninstall packa­ge_­name
dnf autore­move uninstall orphaned packages

Download the DNF Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/misterrabinhalder_dnf.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          More Cheat Sheets by misterrabinhalder

          RPM Cheat Sheet