Charlie Harvey

Setting up unattended upgrades on debian

There is fuller documentation of how to set up unattended upgrades on the debian wiki, but it is sometimes nice to have a super-compact "cheatsheet" for ones own reference. Others may have a use for it too.

First thing to do is to install the necessary unattended-upgrades and apt-listchanges packages. You can also configure unattended upgrades once they install. As root do

aptitude install unattended-upgrades apt-listchanges && vim /etc/apt/apt.conf.d/50unattended-upgrades

You will want to enable the emails and I like to have unused dependencies removed as well.

Unattended-Upgrade::Mail "root"; Unattended-Upgrade::Remove-Unused-Dependencies "true";

Set up the periodic upgrade run, again as root.

dpkg-reconfigure -plow unattended-upgrades

Then sort out the list changes config at /etc/apt/listchanges.conf.

[apt] frontend=pager email_address=root confirm=0 save_seen=/var/lib/apt/listchanges.db which=both

That should be it done, check your email for upgrade runs.


Comments

  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.