APT unattended upgrades on Debian configuration guide
Install unattended-upgrades:
sudo apt install unattended-upgrades
Enable unattended-upgrades:
sudo dpkg-reconfigure unattended-upgrades
Create a custom configuration from the defaults:
sudo cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/52unattended-upgrades-local
Edit the custom configuration:
sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-local
The default configuration automatically installs security updates, but not new features. To change this, uncomment the following line under the Unattended-Upgrade::Origins-Pattern section:
// "origin=Debian,codename=${distro_codename}-updates";
Debug unattended-upgrades by running it manually:
sudo unattended-upgrade -d