Question

Error Updating unattended-updates Package

So far on this installation of Ubuntu 16.04, the only actions taken were as follows:

  • Installed Discourse (Manually)
  • Enabled UFW
  • Enabled a new user account with root privledges

In Discourse’s recommendation, the unattended-updates package should handle updating the system instead of manually. The command recommended is as follows:

dpkg-reconfigure -plow unattended-upgrades

However trying a variety of combinations, the only result I get back is the following:

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

I’ve tried searching the internet with no clear answers. Any details or instructions you can give me to learn how to solve this in the future by myself would be helpful as well. Thank you in advance!


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@LinkChef

By default, that package will generally only install security updates unless otherwise configured. The configuration file that governs what is actually updated is located here:

/etc/apt/apt.conf.d/50unattended-upgrades

At the top of the file you’ll see something that looks like:

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}";
        "${distro_id}:${distro_codename}-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

Notice the first two lines are not commented while the next three are. That means that only security updates will be automatically installed as they are available. This is what you want.

Unless you’re 100% sure that uncommenting the third line to allow updates of all types to be applied will not break something down the line, it should be left commented. Why? This targets everything on your system – MySQL, PHP, NodeJS, Apache/NGINX, etc – i.e. anything you’ve installed from the CLI using the package manager. If something happens during one of the upgrades that causes it to fail or if it overwrites configuration that you’ve changed, you’ll have to go in and fix it.

It’s best to apply upgrades at your leisure and allow the unattended manager to only work with the security updates portion of what’s available.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@LinkChef

Generally, you want to handle updates & upgrades prior to installing, such as:

apt-get update \
&& apt-get -y upgrade

And then perform any actions needed to handle package installation. Warnings, such as the one you received above, are common as some packages try to use one service manager or another and fall back to whichever one is available if possible.

Unless you received an actual error and it prevented installation of the packages you were trying to install, you should be okay. If you did receive an error, please post that as well.