Cheatography
https://cheatography.com
Dnf is the default high-level package manager in the Red Hat family. It's the successor of Yum. Dnf is. modern and fast and have a lot of nice and convenient features to install, update, remove software.
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Repositories
To print the list of all enabled repositories |
|
show only enabled |
|
disabled |
|
all |
|
show disables/enables |
dnf install package_name -disablerepo=* --enablerepo=repo_name
|
Enable/disable |
dnf config-manager --set-disabled
|
List packages from repo |
dnf repository-packages fedora list
|
|
dnf repository-packages fedora list available
|
|
dnf repository-packages fedora list installed
|
Quick start - basic Usage of dnf
Search |
|
Install |
|
Remove |
|
Install group |
dnf -y group install --with-optional "Development Tools"
|
|
|
Groups
List available package groups |
|
Info of group components |
dnf -v group info virtualization
|
List installed |
dnf group list --installed
|
Installing |
dnf install @virtualization
|
|
dnf group install virtualization
|
|
dnf group install --with-optional virtualization
|
Upgrade |
dnf group upgrade virtualization
|
Removing |
dnf group remove virtualization
|
If we only want to obtain the list of all installed package groups, instead, we can use the --installed option:
|
|
Options
Setting for disable install recommenden libs |
dnf --setopt=install_weak_deps=False
|
DNF config-manager
Help |
dnf config-manager --help-cmd
|
Enable repo |
dnf config-manager --set-enabled <repo>
|
Disable repo |
dnf config-manager --set-disabled <repo>
|
Add repo |
dnf config-manager --add-repo=<repo>
|
Removing/Cleaning
Remove the named packages |
dnf remove a_package_name
|
Removes a group, and its packages |
dnf group remove a_group_name
|
Removes old versions of packages |
dnf remove --oldinstallonly
|
Removes cached packages |
|
Clean dbcache, metadata, cached # packages, and to expire repositories meta data |
|
Removing/Cleaning
Remove the named packages |
dnf remove a_package_name
|
Removes a group, and its packages |
dnf group remove a_group_name
|
Removes old versions of packages |
dnf remove --oldinstallonly
|
Removes cached packages |
|
Clean dbcache, metadata, cached # packages, and to expire repositories meta data |
|
|