We're running unattended-upgrades on debian squeeze, and would like it to run once a week, only on a Wednesday morning.

To attempt this, we have set:

APT::Periodic::Unattended-Upgrade "7"

in /etc/apt/apt.conf.d/50unattended-upgrades

And then touched the /var/lib/apt/periodic/update-stamp to set the timestamp to a Wednesday, for instance:

touch -t 201211280000 /var/lib/apt/periodic/update-stamp


stamp=$(date --date=$(date -r /var/lib/apt/periodic/update-stamp --iso-8601) +%s 2>/dev/null)

date -u --date="1970-01-01 $stamp sec GMT"

Gives the correct timestamp:

Wed Nov 28 00:00:00 UTC 2012

However, unattended-upgrades then seems to ignore this, and run the updates on a Saturday morning.

Could anyone enlighten me as to how this parameter works, and how to set up upgrades to run on a Wednesday?


I think, that, from /etc/cron.daily/apt, unattended upgrades use /var/lib/apt/periodic/upgrade-stamp file (not update-stamp).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.