Home

yum and dnf

Introduction

Difference Between YUM and DNF

Common usage

up

Introduction

“YUM” is an acronym of “Yellowdog Updater, Modified”. It's a software package management utility used in many popular Linux distributions, including Fedora and CentOS.

YUM allows for automatic updates and package and dependency management on RPM-based distributions. Like the Advanced Package Tool (APT) from Debian, YUM works with software repositories (collections of packages), which can be accessed locally or over a network connection.

"DNF" is an acronym of "Dandified YUM". It's the next-generation version of YUM, and as a rule, it might be better than YUM.

DNF is powerful and has robust features than you'll find in yum. DNF makes it easy to maintain groups of packages and capable of automatically resolving dependency.

up

Difference Between YUM and DNF

Performance

YUM was slow and used a great deal of memory, and much of its code needed to be rewritten.In comparison, DNF uses very less memory when synchronizing the metadata of the repositories, compared to YUM which is known for its excessive memory usage. Many long-standing issues with YUM remain unsolved, so DNF package manager has basically replaced the YUM

API

YUM's API is not as well documented as DNF's, so it is tough to create new features. One of the major distinction points is that DNF adheres to a strict API and that API encourages the development of extensions and plug-ins to DNF. The API is also very well documented making it easy to implement new features.

Dependency Resolution

YUM, uses the public API for dependency resolution. DNF sports better dependency resolution because it uses the more modern and advanced ‘libsolv’ for improved dependency solving.Libsolv is a proven code base and one of the most sophisticated dependency solving implementations.

Summary

The major differences between YUM and DNF are mainly in performance, memory usage, and how the code has been rewritten to make it easy for developers to maintain a predictable documented API. One other difference is that DNF is compatible with Python3 where YUM is not. Also, the package dependency algorithm has been entirely rewritten. Besides, the main purpose of YUM or DNF is to manage actual RPM packages on your system.

up

Common Usage

YUM

Install a Package: yum install package-name

Use the option -y to automatic confirm the installation: yum -y install package-name

Remove a package: yum remove package-name or yum -y remove package-name

update a package: yum update package-name or yum -y update package-name

List a Package: yum list package-name

Search for a Package: yum search package-name

Get Information about a Package: yum info package-name

Check for Available Updates: yum check-update

Update System: yum update

DNF

Install a Package: dnf install package-name

Remove a package: dnf remove package-name

update a package: dnf update package-name or update multiple packages: dnf update package-name1 package-name2

List a Package: dnf list package-name

Search for a Package: dnf search packagename

Get Information about a Package: dnf info package-name

Check for Available Updates: dnf check-update or dnf list updates

Update/Upgrade all packages: dnf upgrade or dnf update