DNF Cheat Sheet

A cheat sheet in English by misterrabinhalder
17,872 views 6,078 downloads 18 Feb 2019 History
3.7 avg · 0 ratings

Overview

/etc/d­nf/­dnf.conf DNF config­uration file
/etc/y­um.r­epos.d all repo files

List

dnf list --all list all installed and available packages
dnf list expression list packages matching expression
dnf list --inst­alled expression list installed packges matching expression
dnf list --avai­lable expression list available packages matching expression
dnf list --extras expression list extras packages matching expression
dnf list --obso­letes expression list obsoletes packages matching expression
dnf list --recent expression list recent packages matching expression
dnf list --upgrades expression list upgrades available for packges matching expression
dnf list --auto­remove list orphaned packages

Info

dnf info packag­e_name show info of packag­e_name
dnf provides path/t­o/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 package download package

Install

dnf install packag­e_name install package and depend­encies
dnf install /path/­to/­loc­al/rpm install local package and depend­encies
dnf install /path/­to/file install package which provides /path/­to/file
dnf reinstall packag­e_name reinstall package and depend­encies
dnf downgrade packag­e_name downgrade package
dnf mark install packag­e_name marks the specified packages as installed by user.
dnf unmark remove packag­e_name unmarks the specified packages as installed by user
dnf mark group packag­e_name marks the specified packages as installed by group

History

dnf history list list dnf transa­ctions history
dnf history info transa­ction show info of particular transa­ction
dnf history redo transa­ction redo particular transa­ction
dnf history rollback transa­ction rollback particular transa­ction
dnf history undo transa­ction undo particular transa­ction
dnf history userin­stalled show all instal­lonly packages, packages installed outside of DNF and packages not installed as dependency

Update

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

Repository

dnf repolist --enabled|--disabled|--all lists enabled, disabled or all known reposi­tories
dnf repoquery searches the available DNF reposi­tories for selected packages
dnf reposi­tor­y-p­ackages run commands on top of all packages in the repository
dnf config­-ma­nager --add-­repo=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 packag­e_name uninstall packag­e_name
dnf autoremove uninstall orphaned packages

Badges

Nice Cheat Sheet Good Cheat Sheet Downloaded from Unusual Locations × 2

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.