Dnf

From Omnia
Revision as of 21:58, 24 July 2026 by Kenneth (talk | contribs) (Created page with "== DNF == Dandified YUM (DNF) is the default software package manager for Fedora, Red Hat Enterprise Linux (RHEL), and related distributions == Upgrade == dnf upgrade === update alias === 'update' appears to be an alias for upgrade ``` $ dnf update --help usage: dnf upgrade ``` == pin package == dependency: # sudo dnf install -y python2-dnf-plugin-versionlock # older rhel versions sudo dnf install -y python3-dnf-plugin-versionlock sudo dnf install -y dnf-pl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DNF

Dandified YUM (DNF) is the default software package manager for Fedora, Red Hat Enterprise Linux (RHEL), and related distributions

Upgrade

dnf upgrade

update alias

'update' appears to be an alias for upgrade
$ dnf update --help
usage: dnf upgrade

pin package

dependency:

# sudo dnf install -y python2-dnf-plugin-versionlock  # older rhel versions
sudo dnf install -y python3-dnf-plugin-versionlock
sudo dnf install -y dnf-plugin-versionlock

Version lock package:

sudo dnf versionlock add <package-name>
# sudo dnf versionlock add kernel
# sudo dnf versionlock add httpd-2.4.57-5.el9

List:

dnf versionlock list

Remove:

sudo dnf versionlock delete <package-name>

Clear all pins:

sudo dnf versionlock clear

Disable repo

List repo ids:

dnf repolist --all

Disable repo:

sudo dnf config-manager --disable <repo_id>
# sudo dnf config-manager --disable epel
# alt:
sudo dnf config-manager setopt epel.enabled=0

Verify:

dnf repolist --all | grep disabled

Disable for only one command:

sudo dnf --disablerepo=epel-testing update

Renable:

sudo dnf config-manager --enable epel-testing

yum - Replaced by DNF

keywords