Unattended Upgrades
Automatically keep your entire system up to date.
This configuration will enable your entire system to upgrade itself to always keep it up to date and perform automatic reboots if required.
sudo apt-get install unattended-upgradesAdd below to
/etc/apt/apt.conf.d/50unattended-upgrades:
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,archive={{ ansible_distribution_release }}";
"origin=Debian,archive={{ ansible_distribution_release }}-security";
"origin=Debian,archive={{ ansible_distribution_release }}-updates";
"origin=Debian,archive=stable-backports";
"origin=Anon";
};
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "03:00";Add below to
/etc/apt/apt.conf.d/20auto-upgrades:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1"sudo systemctl restart unattended-upgrades
Last updated