Chapter 6. Automating software updates in RHEL


Ensure your Red Hat Enterprise Linux (RHEL) 10 system remains secure and up-to-date by automating software updates with the DNF Automatic tool. Automatically installing security patches and bug fixes helps you maintain environment stability while reducing the effort for manual system maintenance.

DNF Automatic is an alternative command-line interface to DNF that is suited for automatic and regular execution by using systemd timers, cron jobs, and other such tools.

DNF Automatic synchronizes package metadata as needed, checks for updates available, and then performs one of the following actions depending on how you configure the tool:

  • Exit
  • Download updated packages
  • Download and apply the updates

The outcome of the operation is then reported by a selected mechanism, such as the standard output or email.

6.1. Installing DNF Automatic

Enable automatic software updates on your Red Hat Enterprise Linux (RHEL) 10 system by installing the DNF Automatic tool. Using this tool ensures your environment remains secure and up-to-date with the latest patches while significantly reducing the time and effort required for manual system maintenance.

Procedure

  • Install the dnf-automatic package:

    # dnf install dnf-automatic

Verification

  • Verify the successful installation by confirming the presence of the dnf-automatic package:

    # rpm -qi dnf-automatic

6.2. DNF Automatic configuration file

The DNF Automatic configuration file defines the parameters for automated software updates in Red Hat Enterprise Linux (RHEL) 10. By managing these settings, you can customize update behaviors to maintain system security consistently with minimal manual effort.

By default, DNF Automatic uses /etc/dnf/automatic.conf as its configuration file to define its behavior. The configuration file has the following topical sections:

  • [commands]

    Sets the mode of operation of DNF Automatic.

    Warning

    Settings of the operation mode from the [commands] section are overridden by settings used by a systemd timer unit for all timer units except dnf-automatic.timer.

  • [emitters]

    Defines how the results of DNF Automatic are reported.

  • [command]

    Defines the command emitter configuration.

  • [command_email]

    Provides the email emitter configuration for an external command used to send email.

  • [email]

    Provides the email emitter configuration.

  • [base]

    Overrides settings from the main configuration file of DNF.

With the default settings of the /etc/dnf/automatic.conf file, DNF Automatic checks for available updates, downloads them, and reports the results to standard output.

6.3. Enabling DNF Automatic

Enable automated software updates on Red Hat Enterprise Linux (RHEL) 10 by activating DNF Automatic timer units. By enabling these units, you ensure your system remains consistently protected and up-to-date without requiring manual effort.

To run DNF Automatic once, you must start a systemd timer unit. However, if you want to run DNF Automatic periodically, you must enable a timer unit.

You can use one of the timer units provided in the dnf-automatic package, or you can create a drop-in file for the timer unit to adjust the execution time.

You can use the following timers:

  • dnf-automatic-download.timer: Downloads available updates.
  • dnf-automatic-install.timer: Downloads and installs available updates.
  • dnf-automatic-notifyonly.timer: Reports available updates.
  • dnf-automatic.timer: Downloads, downloads and installs, or reports available updates.

Prerequisites

  • You specified the behavior of DNF Automatic by modifying the /etc/dnf/automatic.conf configuration file.

Procedure

  • To enable and execute a systemd timer unit immediately, enter:

    # systemctl enable --now <timer_name>

    If you want to only enable the timer without executing it immediately, omit the --now option.

Verification

  • Verify that the timer is enabled:

    # systemctl status <systemd_timer_unit>
  • Optional: Check when each of the timers on your system ran the last time:

    # systemctl list-timers --all

The systemd timer units in the dnf-automatic package provide the scheduling framework for automated software updates in Red Hat Enterprise Linux (RHEL) 10. Understanding these units helps you to customize the timing and frequency of update checks and patch applications.

The systemd timer units take precedence and override the settings in the /etc/dnf/automatic.conf configuration file when downloading and applying updates. For example if you set download_updates = yes in the /etc/dnf/automatic.conf configuration file, but you have activated the dnf-automatic-notifyonly.timer unit, DNF will not download the packages.

The dnf-automatic package provides following systemd timer units:

Expand
Table 6.1. systemd timers distributed with dnf-automatic
Timer unitFunctionOverrides the apply_updates and download_updates settings in the [commands] section of the /etc/dnf/automatic.conf file?

dnf-automatic-download.timer

Downloads packages to cache and makes them available for updating.

This timer unit does not install the updated packages. To perform the installation, you must run the dnf update command.

Yes

dnf-automatic-install.timer

Downloads and installs updated packages.

Yes

dnf-automatic-notifyonly.timer

Downloads only repository data to keep the repository cache up-to-date and notifies you about available updates.

This timer unit does not download or install the updated packages.

Yes

dnf-automatic.timer

The behavior of this timer when downloading and applying updates is specified by the settings in the /etc/dnf/automatic.conf configuration file.

This timer downloads packages, but does not install them.

No

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top