-
-
Save AskinNet/a10d97b2cc8a1ed78796826abe34d066 to your computer and use it in GitHub Desktop.
Enable automatic updates in Fedora and Debian
-
Install plugin
sudo apt install unattended-upgrades
-
Edit package behavior
Create a new configuration override file and set its contents to the following, changing values to your liking.
sudo $EDITOR /etc/apt/apt.conf.d/51unattended-upgrades-local
Unattended-Upgrade::Origins-Pattern { "origin=*"; }; Unattended-Upgrade::Automatic-Reboot "false";
This will upgrade all packages, regardless of which repository they come from. It won't reboot after installing upgrades.
See Debian Reference § 2.7.3: Automatic download and upgrade of packages, /etc/apt/apt.conf.d/50unattended-upgrades
and /usr/share/doc/unattended-upgrades/README.md.gz
for documentation, defaults, and examples.
- Install plugin
sudo dnf install dnf5-plugin-automatic
- Edit plugin behavior
sudo cp /usr/share/dnf5/dnf5-plugins/automatic.conf /etc/dnf/automatic.conf sudo $EDITOR /etc/dnf/automatic.conf
commands.apply_updates
can be set toyes
to actually install the updates instead of only downloading them - Edit timer
For example, to make DNF install updates at exactly 1:05 AM every day, you can set the file contents to
sudo systemctl edit dnf5-automatic.timer
more systemd timer examples[Timer] OnCalendar=*-*-* 1:05 RandomizedDelaySec=0
- Enable timer
sudo systemctl enable --now dnf5-automatic.timer
- Verify timer status
systemctl status dnf5-automatic.timer systemctl list-timers --all dnf5-automatic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment