How to verify that unattended-upgrades are enabled?

cat /etc/apt/apt.conf.d/20auto-upgrades

shows if things get auto-installed

cat /etc/apt/apt.conf.d/50unattended-upgrades |grep -v //

This will show you what gets automatically installed. And by default it should install the security ones. There are other files there depending on which system exactly you are running so cat your way around them maybe.


The configuration can be looked up in /etc/apt/apt.conf.d/20auto-upgrades. In addition, you can check the log file /var/log/dpkg.log. If unattended upgrades are working, you should see recent events there.

Let us look at two example sessions:

Machine 1 (unattended upgrades disabled):

$ cat /etc/apt/apt.conf.d/20auto-upgrades
cat: /etc/apt/apt.conf.d/20auto-upgrades: No such file or directory
$ tail /var/log/dpkg.log
(no output, empty file)

Machine 2 (unattended upgrades enabled):

$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
$ tail /var/log/dpkg.log
2017-06-07 18:35:38 status half-configured linux-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 status installed linux-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 configure linux-signed-image-generic:amd64 4.10.0.22.24 <none>
2017-06-07 18:35:38 status unpacked linux-signed-image-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 status half-configured linux-signed-image-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 status installed linux-signed-image-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 configure linux-signed-generic:amd64 4.10.0.22.24 <none>
2017-06-07 18:35:38 status unpacked linux-signed-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 status half-configured linux-signed-generic:amd64 4.10.0.22.24
2017-06-07 18:35:38 status installed linux-signed-generic:amd64 4.10.0.22.24

(Machine 1 was running Ubuntu 16.04, Machine 2 was running Ubuntu 17.04. It should not make a difference, though.)