Skip to content

Instantly share code, notes, and snippets.

@nikodunk
Last active April 9, 2025 19:25
Show Gist options
  • Save nikodunk/a91a7e37258b192517bbacc853872dc2 to your computer and use it in GitHub Desktop.
Save nikodunk/a91a7e37258b192517bbacc853872dc2 to your computer and use it in GitHub Desktop.
unattended upgrades on Debian and Fedora

Run sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-local and add contents

Unattended-Upgrade::Origins-Pattern {
    "origin=*";
};

Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";

Unattended-Upgrade::Automatic-Reboot "true";

Unattended-Upgrade::Automatic-Reboot-Time "03:00";

Run sudo dpkg-reconfigure unattended-upgrades to start it.

The 50unattended-upgrades that's already there is not supposed to be edited accoring to the debian unattended upgrades wiki.

This solution from Reddit

@nikodunk
Copy link
Author

nikodunk commented Apr 9, 2025

On Fedora, I've made the docs less confusing IMO: https://docs.fedoraproject.org/en-US/quick-docs/autoupdates/

It's now just:
sudo dnf install dnf-automatic
sudo nano /etc/dnf/automatic.conf and then add contents

[commands]
apply_updates=True
reboot=when-needed

systemctl enable --now dnf-automatic.timer

This solution from same thread Reddit and user - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment