---
name: "dnf-automatic"
section: "8"
platform: "linux"
package: "dnf"
version: "4.24.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dnf-automatic"
---

# dnf-automatic(8)

DNF Automatic

## NAME

dnf-automatic - DNF Automatic

## SYNOPSIS

**dnf-automatic \[\<config file\>\]**

## DESCRIPTION

Alternative CLI to **dnf upgrade** with specific facilities to make it suitable to be executed automatically and regularly from systemd timers, cron jobs and similar.

The operation of the tool is usually controlled by the configuration file or the function-specific timer units (see below). The command only accepts a single optional argument pointing to the config file, and some control arguments intended for use by the services that back the timer units. If no configuration file is passed from the command line, **/etc/dnf/automatic.conf** is used.

The tool synchronizes package metadata as needed and then checks for updates available for the given system and then either exits, downloads the packages or downloads and applies the packages. The outcome of the operation is then reported by a selected mechanism, for instance via the standard output, email or MOTD messages.

The systemd timer unit **dnf-automatic.timer** will behave as the configuration file specifies (see below) with regard to whether to download and apply updates. Some other timer units are provided which override the configuration file with some standard behaviours:

- •

  dnf-automatic-notifyonly

- •

  dnf-automatic-download

- •

  dnf-automatic-install

Regardless of the configuration file settings, the first will only notify of available updates. The second will download, but not install them. The third will download and install them.

## RUN DNF-AUTOMATIC

You can select one that most closely fits your needs, customize **/etc/dnf/automatic.conf** for any specific behaviors, and enable the timer unit.

For example: **systemctl enable --now dnf-automatic-notifyonly.timer**

## CONFIGURATION FILE FORMAT

The configuration file is separated into topical sections.

### \[commands\] section

Setting the mode of operation of the program.

- **apply\_updates**

  boolean, default: False

  Whether packages comprising the available updates should be applied by **dnf-automatic.timer**, i.e. installed via RPM. Implies **download\_updates**. Note that if this is set to **False**, downloaded packages will be left in the cache till the next successful DNF transaction. Note that the other timer units override this setting.

- **download\_updates**

  boolean, default: False

  Whether packages comprising the available updates should be downloaded by **dnf-automatic.timer**. Note that the other timer units override this setting.

- **network\_online\_timeout**

  time in seconds, default: 60

  Maximal time dnf-automatic will wait until the system is online. 0 means that network availability detection will be skipped.

- **random\_sleep**

  time in seconds, default: 0

  Maximal random delay before downloading.  Note that, by default, the **systemd** timers also apply a random delay of up to 1 hour.

- **upgrade\_type**

  either one of **default**, **security**, default: **default**

  What kind of upgrades to look at. **default** signals looking for all available updates, **security** only those with an issued security advisory.

- **reboot**

  either one of **never**, **when-changed**, **when-needed**, default: **never**

  When the system should reboot following upgrades. **never** does not reboot the system. **when-changed** triggers a reboot after any upgrade. **when-needed** triggers a reboot only when rebooting is necessary to apply changes, such as when systemd or the kernel is upgraded.

- **reboot\_command**

  string, default: **shutdown -r +5 'Rebooting after applying package updates'**

  Specify the command to run to trigger a reboot of the system. For example, to skip the 5-minute delay and wall message, use **shutdown -r**

### \[emitters\] section

Choosing how the results should be reported.

- **emit\_via**

  list, default: **email, stdio, motd**

  List of emitters to report the results through. Available emitters are **stdio** to print the result to standard output, **command** to send the result to a custom command, **command\_email** to send an email using a command, and **email** to send the report via email and **motd** sends the result to */etc/motd* file.

- **system\_name**

  string, default: hostname of the given system

  How the system is called in the reports.

- **send\_error\_messages**

  boolean, default: False

  Invokes emitters when an error occurs.

### \[command\] section

The command emitter configuration. Variables usable in format string arguments are **body** with the message body.

- **command\_format**

  format string, default: **cat**

  The shell command to execute.

- **stdin\_format**

  format string, default: **{body}**

  The data to pass to the command on stdin.

### \[command\_email\] section

The command email emitter configuration. Variables usable in format string arguments are **body** with message body, **subject** with email subject, **email\_from** with the "From:" address and **email\_to** with a space-separated list of recipients.

- **command\_format**

  format string, default: **mail -Ssendwait -s {subject} -r {email\_from} {email\_to}**

  The shell command to execute.

- **email\_from**

  string, default: **root**

  Message's "From:" address.

- **email\_to**

  list, default: **root**

  List of recipients of the message.

- **stdin\_format**

  format string, default: **{body}**

  The data to pass to the command on stdin.

### \[email\] section

The email emitter configuration.

- **email\_from**

  string, default: **root**

  Message's "From:" address.

- **email\_host**

  string, default: **localhost**

  Hostname of the SMTP server used to send the message.

- **email\_port**

  integer, default: **25**

  Port number to connect to at the SMTP server.

- **email\_tls**

  either one of **no**, **yes**, **starttls**, default: **no**

  Whether to use TLS, STARTTLS or no encryption to connect to the SMTP server.

- **email\_to**

  list, default: **root**

  List of recipients of the message.

### \[base\] section

Can be used to override settings from DNF's main configuration file. See DNF Configuration Reference \<\>.

## Author

See AUTHORS in DNF source distribution.

## Copyright

2012-2020, Red Hat, Licensed under GPLv2+
