I set root
's cron to automatically run apt-get upgrade
. Easy enough. Here's the specific line:
@daily (apt-get update && apt-get -y upgrade) 2>&1 > /var/log/tmp.log
However, I've been following the log file's output, and it always stops at the part of the output where it would typically (i.e. without -y
) ask Do you want to continue [Y/n]?
. I confirm that it didn't keep running because apt-get upgrade
still shows packages needing to be updated. Why is it stopping at this point? And how do I get it to continue?
Edit:
### apt-get update output ###
Building dependency tree...
Reading state information...
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
The following packages will be upgraded:
file libgudev-1.0-0 libmagic1 libpam-systemd libsystemd-daemon0
libsystemd-login0 libudev1 linux-libc-dev openssh-client openssh-server
systemd-services udev
12 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/3,412 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Edit 2: I shortened the command to try and isolate the problem. I also read up on man apt-get
. I found a new potential flag to pass, leaving me with:
@daily apt-get -y --force-yes upgrade 2>&1 > /var/log/tmp.log
Unfortunately, I still get the same results :(