Ubuntu
sudo dpkg-reconfigure --priority=low unattended-upgrades

Raspian

  • Update the package list, update all packages and remove any packages that are no longer required.
  • Type sudo apt-get update -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
  • Type sudo apt-get install unattended-upgrades apt-listchanges bsd-mailx -y

This is the article I'm referencing: Setting up Automatic Updates on Raspberry Pi