2

I have just started learning web server administration. I have noticed that I get this update message very often on Ubuntu:

xx packages can be updated xx updates are security update 

When I see it I do:

sudo apt-get update sudo apt-get upgrade 

If this correct? Is there a way make this task automatically, maybe all days at the same hours or when x updates are available?

1 Answer 1

5

Yes it is correct. Ubuntu repositories receive upgrades quite often, so you are likely to see pending security upgrades around once a week or more, depending on the packages you've installed. You are doing the right thing, but as you have guessed you can automate this.

You are looking for "unattended upgrades" (https://help.ubuntu.com/community/AutomaticSecurityUpdates).

Unattended upgrades is an APT feature and allows you to upgrade packages (you can choose if you wish only security upgrades or all, etc).

When you use unattended upgrades for security issues, you will receive mails telling you whether you need to reboot any host as a result of the upgrades.

3
  • 4
    Which doesn't mean you should update/upgrade on a live production system without testing the required functionality first. Commented Oct 22, 2014 at 18:28
  • And what does this mean? I should have other server exactly with the same configuration to test the updates? this should be an online server or local? Commented Oct 23, 2014 at 7:50
  • To me, it means that when you have testing environments, you shall apply upgrades only to testing/preproduction environments first, and then roll out to production. In practice, Ubuntu security updates are very stable, and it's very unlikely that they break anything, especially if you use a common stack of software (ie. LAMP). Commented Oct 23, 2014 at 7:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.