Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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