(Warnings regarding automatic upgrades have already been voiced by previous posters.)
Given the track record of the Debian Security team in the last few years, I consider the risks of broken upgrades far less than the benefit of having automatic updates on seldom-visited systems.
Debian Lenny comes with unattended-upgrades, which originated from Ubuntu and is considered to be the defacto solution for unattended upgrades for Debian starting from Lenny/5.0.
To get it up and running on a Debian system you need to install the
Then add these lines to
(Note: In Debian Squeeze/6.0 there is no
/etc/apt/apt.conf. The preferred method is to use the following command, which will create the above lines in
sudo dpkg-reconfigure -plow unattended-upgrades
A cron job is then run nightly and checks if there are security updates which need to be installed.
Actions by unattended-upgrades can be monitored in
/var/log/unattended-upgrades/. Be wary, that for kernel security fixes to become active, you need to reboot the server manually. This can also be done automatically in course of a planned (e.g. monthly) maintenance window.