dnf

最後更新: 2020-07-10

DNF

It uses libsolv for dependency resolution
It is written in C, C++, Python
All performance is good in terms of memory usage and dependency resolution of repository metadata.

dnf vs yum

Yum Package Manager has been replaced by DNF Package Manager(successor to YUM )
(install or update the package, and its dependencies, using the rpm command)

 


Usage

 

Basic

dnf search packagename

info

dnf install packagename

dnf remove packagename

autoremove - removes packages installed as dependencies that are no longer required by currently installed programs.

Upgrade

check-update - checks for updates, but does not download or install the packages.

upgrade - checks the repositories for newer packages and updates them.

downgrade - reverts to the previous version of a package.

Exclude

dnf upgrade --exclude=packagename

Remark: exclude in config file

/etc/dnf/dnf.conf

excludepkgs=packagename

 


Plugins: Versionlock plugin

 

# Install plugin

dnf install 'dnf-command(versionlock)'

# Usage

dnf versionlock add package

dnf versionlock delete package

# List all locked packages

dnf versionlock list

# delete all locked entries

dnf versionlock clear

# Automatic Updates

The "dnf-automatic" package is a component that allows automatic download and installation of updates.