I have several Ubuntu servers which I want to have all upgrades applied automatically. I used to use a simple script which ran
apt-get update && apt-get upgrade but that wasn’t very robust, so I’m trying to migrate to
unattended-upgrades instead, which seems to be the officially recommended way of doing this.
However, I’m struggling to achieve the following tasks:
- How to get an email every day (assuming
unattended-upgradesruns every day). At the moment I only seem to get emails when packages are upgraded (I prefer to get an email every day as that way I know if the email doesn’t arrive, something has gone wrong).
- How to upgrade all packages, not just those with security updates.
All the tutorials I can find, including the official Ubuntu documentation, tell me to edit the existing files in
/etc/apt/apt.conf.d. However, I prefer to override options using additional files, partly so that I don’t get a ‘configuration file differs from maintainer’ error later and also because this makes it easier to keep all the overrides in configuration management and version control.
Is it possible to override all the configuration options in this way? I’ve tried doing this and have found that some overrides seem to work whilst others don’t.
My current overrides files is at
/etc/apt/apt.conf.d/99zz-overrides (named to make sure it’s read last) and contains the following:
Unattended-Upgrade::Mail "firstname.lastname@example.org"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1";
I haven’t changed anything else in