Windows 7 automatically installs updates before shutdown. Can I get the same effect on Xubuntu?

I want to install Xubuntu on a friend's machine and make sure that security updates are installed, but he is computer illiterate, and I don't want him to be constantly bothered with update notifications.


Make sure you have the package unattended-upgrades installed, then configure the following options in /etc/apt/apt.conf.d/50unattended-upgrades:

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {

// This option allows you to control if on a unclean dpkg exit
// unattended-upgrades will automatically run 
//   dpkg --force-confold --configure -a
// The default is true, to ensure updates keep getting installed
Unattended-Upgrade::AutoFixInterruptedDpkg "true";

// Split the upgrade into the smallest possible chunks so that
// they can be interrupted with SIGUSR1. This makes the upgrade
// a bit slower but it has the benefit that shutdown while a upgrade
// is running is possible (with a small delay)
Unattended-Upgrade::MinimalSteps "true";

// Install all unattended-upgrades when the machine is shuting down
// instead of doing it in the background while the machine is running
// This will (obviously) make shutdown slower
Unattended-Upgrade::InstallOnShutdown "true";

// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";
  • What is about the files 10periodic and 20auto-upgrades? Do they need to exist? What parameter should they contain? Should they be modified as well? – Silicomancer Dec 18 '19 at 9:18

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.