Configure Ubuntu Auto Upgrade in terminal
- Install dependencies
sudo apt install unattended-upgrades
# Enable this setting in Unattended-Upgrade::Allowed-Origins "${distro_id}:${distro_codename}-updates";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; Unattended-Upgrade::Remove-Unused-Dependencies "true";
# Replace email address with administrator address and insure that email can be sent from cli Unattended-Upgrade::Mail "you@some.site"; # Enable auto reboot Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot-Time "02:38"; # For non-critical servers, add this: Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
# Some of these settings may already be active APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1";
sudo unattended-upgrades --dry-run --debug
References