DNF-AUTOMATIC(8)

πŸ’… dnf-automatic(8) β€” the girl's guide to DNF Automatic ✨

okay so first things first, this is a section 8 manual page, bestie β€” the dnf-automatic one, from the DNF family. she's a whole tool, and she's about to become your new fave 🫢


🌸 SYNOPSIS 🌸

dnf-automatic [<config file>]

✨ DESCRIPTION ✨

so dnf-automatic is basically an alternative CLI to dnf upgrade, but specifically built with the facilities to make it suitable for running automatically and regularly β€” like, from systemd timers, cron jobs, and similar "nobody's watching, she just goes" situations. it's giving responsible older sister energy πŸ‘‘

the way this tool operates is usually controlled by the configuration file, or by the function-specific timer units (scroll down, they're coming). the command only accepts a single optional argument pointing to the config file, plus some control arguments that are intended for use by the services that back the timer units. and if no configuration file is passed from the command line? she just uses /etc/dnf/automatic.conf by default. no cap.

the tool synchronizes package metadata as needed, then checks for updates available for the given system, and then either exits, downloads the packages, or downloads and applies them. 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 exactly as the configuration file specifies (see below) with regard to whether to download and apply updates. some other timer units are provided too, and these ones 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 one 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 the one that most closely fits your needs, customize /etc/dnf/automatic.conf for any specific behaviors, and enable the timer unit. that's the whole ritual, bestie πŸ•―οΈ

for example:

systemctl enable --now dnf-automatic-notifyonly.timer

πŸ¦‹ CONFIGURATION FILE FORMAT πŸ¦‹

the configuration file is separated into topical sections. very organized. very demure. πŸ’…

🌈 [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. this 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. also 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 too.
  • network_online_timeout β€” time in seconds, default: 60. the maximal time dnf-automatic will wait until the system is online. 0 means that network availability detection will be skipped entirely πŸƒβ€β™€οΈ
  • 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. so like, she naps 😴
  • 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. she will be heard.

  • 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 the /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.

2012-2020, Red Hat, Licensed under GPLv2+


okay that's the whole page, bestie, you ate that 🫢✨ this was version 4.23.0, dated Mar 19, 2025, straight from the DNF DNF-AUTOMATIC(8) corner of the universe β€” now go enable that timer and let her cook πŸ’…πŸŽ€

πŸ“¦ where this page comes from