Saturday, February 11, 2023

What is dnf-automatic and the difference with DNF?

The dnf-automatic is an alternative to dnf upgrade command which can be executed automatically and regularly via systemd timers, cron jobs and similar.

And then DNF or Dandified YUM is the next-generation version of the Yellowdog Updater, Modified (yum), a package manager for .rpm-based Linux distributions. DNF was introduced in Fedora 18 in 2013, it has been the default package manager since Fedora 22 in 2015, Red Hat Enterprise Linux 8, and OpenMandriva; and also an alternative package manager for Mageia.

Perceived deficiencies of yum (which DNF is intended to address) include poor performance, high memory usage, and the slowness of its iterative dependency resolution. DNF uses libsolv, an external dependency resolver.

DNF performs package management tasks on top of RPM, and supporting libraries.

DNF was originally written in Python, but as of 2016 efforts are under way to port it to C and move most functionality from Python code into the new libdnf library. libdnf is already used by PackageKit, a Linux distribution-agnostic package system abstraction library, even though the library does not have most of DNF's features.


It synchronizes the package metadata as needed and then checks for updates available for your RHEL-based systems. Depending upon the configuration file settings, dnf-automatic command either downloads the package updates, or downloads and installs the packages, or simply exits.

The function of dnf-automatic is usually controlled by the configuration file (dnf-automatic.timer) or function-specific timer units as listed below.

  • dnf-automatic-notifyonly - Only notifies when the updates available,
  • dnf-automatic-download - Only downloads the updates, but not install them,
  • dnf-automatic-install - Downloads and install package updates automatically.

You can choose any one that suits your requirements.

Please note that the function-specific timer units will override the settings of the default configuration file i.e. dnf-automatic.timer.

To install dnf-automatic in RHEL, Fedora, CentOS Stream, AlmaLinux and Rocky Linux, run:

$ sudo dnf install dnf-automatic

to use dnf-automatic, Edit dnf-automatic default configuration file using your favorite editor:

$ sudo nano /etc/dnf/automatic.conf

And adjust the settings as per your requirements. The three important settings that you should adjust here are given below:

upgrade_type = default
download_updates = yes
apply_updates = no


Post a Comment