2017-12-14 10:36:49 +00:00
[id='setting-automatic-updates']
= Setting automatic updates
This section describes how to use the DNF Automatic application to automatically:
* Download and install any new updates
* Only download the updates
* Get notified about the updates
[discrete]
== Procedure
2018-01-21 13:48:48 +00:00
. Install the [package]_dnf-automatic_ package:
2017-12-14 10:36:49 +00:00
+
----
2021-01-29 08:38:42 +00:00
sudo dnf install dnf-automatic
2017-12-14 10:36:49 +00:00
----
2021-02-10 08:21:48 +00:00
. Edit the [filename]`/etc/dnf/automatic.conf` configuration file as needed. See the https://dnf.readthedocs.io/en/latest/automatic.html[DNF Automatic] documentation for details.
2017-12-14 10:36:49 +00:00
. Enable and start the `systemd` timer:
+
[literal,subs="+quotes,attributes"]
----
2021-01-29 08:38:42 +00:00
sudo systemctl enable --now _timer_
2017-12-14 10:36:49 +00:00
----
+
2018-01-21 13:48:48 +00:00
Replace `_timer_` with one of following ones depending on what action you want to do:
2017-12-14 10:36:49 +00:00
+
--
* `dnf-automatic-install.timer` to download and install packages
* `dnf-automatic-download.timer` to only download packages
2021-01-29 08:38:42 +00:00
* `dnf-automatic-notifyonly.timer` to only get a notification using configured emitters in the [filename]`/etc/dnf/automatic.conf` file.
2017-12-14 10:36:49 +00:00
--
+
For example:
+
----
2021-01-29 08:38:42 +00:00
sudo systemctl enable --now dnf-automatic-install.timer
Created symlink /etc/systemd/system/timers.target.wants/dnf-automatic-install.timer → /usr/lib/systemd/system/dnf-automatic-install.timer.
2017-12-14 10:36:49 +00:00
----
. Ensure that the timer has been successfully enabled and started:
+
2017-12-18 16:23:48 +00:00
[literal,subs="+quotes,attributes"]
2017-12-14 10:36:49 +00:00
----
2021-01-29 08:38:42 +00:00
sudo systemctl status _timer_
2017-12-14 10:36:49 +00:00
----
+
2018-01-21 13:48:48 +00:00
Replace `_timer_` with the timer from the previous step, for example:
2017-12-14 10:36:49 +00:00
+
----
2021-01-29 08:38:42 +00:00
sudo systemctl status dnf-automatic-install.timer
● dnf-automatic-install.timer - dnf-automatic-install timer
Loaded: loaded (/usr/lib/systemd/system/dnf-automatic-install.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Fri 2021-01-29 14:50:22 +08; 1s ago
Trigger: Sat 2021-01-30 06:05:57 +08; 15h left
Triggers: ● dnf-automatic-install.service
2017-12-14 10:36:49 +00:00
2021-01-29 08:38:42 +00:00
Jan 29 14:50:22 localhost.localdomain systemd[1]: Started dnf-automatic-install timer.
2017-12-14 10:36:49 +00:00
----
[discrete]
== Additional Resources
2021-02-10 08:21:48 +00:00
* The https://dnf.readthedocs.io/en/latest/automatic.html[DNF Automatic] documentation