LinkChef
By:
LinkChef

Error Updating unattended-updates Package

January 23, 2017 535 views
System Tools Ubuntu 16.04

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!

2 Answers

@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.

  • @jtittle

    Thank you for the response!

    As for your recommendation, I did perform and apt-get update/upgrade before installing any new packages, as I try to do whenever I log into my server using SSH.

    All packages were installed correctly as well, but from what I understand, setting up this command would let the server install patches and security updates automatically. As I log into my server this morning, there are 22 updates waiting for me to install. So, what I can infer is that after getting the warning listed above, the unattended-upgrades package does not initiate its auto-update feature. Is there a way to get past this warning and automatically update the server's packages?

@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.

Have another answer? Share your knowledge.