1. Install unattended upgrades and mailx.
#> apt-get install unattended-upgrades bsd-mailx
2. Configure the upgrades
#> vi /etc/apt/apt.conf.d/50unattended-upgrades
Normally the default configuration should be ok; if you want to change anything, please read the comments in the file which make the configuration self-explaining. For example, you can specify the upgrade origins (default: stable and security), you can blacklist packages that should not be updated, you can have the system email you if there are problems, you can have the system remove unused dependencies after an update, or you can make the system do an automatic reboot if this is needed after an update. Please note: The double slashes // serve as a comment; anything that follows a comment in the same line will not be evaluated.
3. Then create file /etc/apt/apt.conf.d/02periodic to enable it.
// Enable the update/upgrade script (0=disable)
// Do "apt-get update" automatically every n-days (0=disable)
// Do "apt-get upgrade --download-only" every n-days (0=disable)
// Run the "unattended-upgrade" security upgrade script
// every n-days (0=disabled)
// Requires the package "unattended-upgrades" and will write
// a log in /var/log/unattended-upgrades
// Do "apt-get autoclean" every n-days (0=disable)
Unattended upgrades will run once per day from the cron /etc/cron.daily/apt
The script will log to the file /var/log/unattended-upgrades/unattended-upgrades.log
TrackbacksTrackback specific URI for this entry
This link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.