Where to find logs/information about unattended-upgrades (apt)?
Solution 1
Unattended upgrade has its own log-file in /var/log/unattended-upgrades/unattended-upgrades.log
.
It is policed by anacron.
# These lines replace cron's entries
1 5 cron.daily run-parts --report /etc/cron.daily
7 10 cron.weekly run-parts --report /etc/cron.weekly
@monthly 15 cron.monthly run-parts --report /etc/cron.monthly
Additional information on what was done is located in /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
.
Solution 2
/var/log/dpkg.log
also /var/log/apt/history.log
Both those log files contain timestamps and descriptions if action was taken. if no action was taken there is no log.
automated updates runs from /etc/cron.daily/apt
and /etc/cron.daily/*
runs from /etc/crontab
in the early morning.
Related videos on Youtube
MacMartin
Updated on September 18, 2022Comments
-
MacMartin over 1 year
Where can I find infos about when the unattend updates/upgrades run and what ist done (or IF something was done)?
I want to enable the unattended-upgrades (for security updates) on a debian virtual server and, yeah, on my RaspberryPi, too.
Do I have to search the
/var/log/apt
-logs for infos about WHAT was installed and/var/log/syslog
about infos WHEN there was an action?I see no CRON entry for when the update-process will run and the configs
/etc/apt/apt.conf.d/20auto-upgrades
and/etc/apt/apt.conf.d/50unattended-upgrades
don't tell me either.
Solution (credits to @bahamut):
sudo cat /var/log/unattended-upgrades/unattended-upgrades.log
2016-12-22 06:35:26,489 INFO Initial whitelisted packages: 2016-12-22 06:35:26,489 INFO script for unattended-upgrades is executed 2016-12-22 06:35:26,489 INFO allowed sources are: ['origin=Debian,codename=jessie,label=Debian-Security'] 2016-12-22 06:35:35,518 INFO Packages that will be upgraded: libsmbclient libtevent0 libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient winbind 2016-12-22 06:35:35,523 INFO dpkg-protocol written to »/var/log/unattended-upgrades/unattended-upgrades-dpkg.log« 2016-12-22 06:35:52,336 INFO all upgrades installed
-
Jasen over 7 yearsit runs from /etc/cron.daily/apt
-
jarno almost 7 years@Jasen or from /usr/lib/apt/apt.systemd.daily in systemd environment.