6

This question already has an answer here:

Is it possible to only install the security updates. If this is possible it needs to be done on several servers and ubuntu virtual machines (Manually in command line) .

I already tried a few solutions but nothing worked out for me. The goal is that by running a script of some sort to sort the security updates together and then update only the security updates.

It isn't possible to install them automatic because the servers and the virtual machines have great impact on the company.

Btw I am a noob on linux / ubuntu . Tried (sudo apt-get upgrade but this only upgrade the existing software , Tried this with no result apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install , Also tried this sudo sh -c 'grep ^deb /etc/apt/sources.list |grep securi >> /etc/apt/sources.security.repos.only.list' with no result. The only option i see left i manualy download the updates and then sort them out.
I already saw that article . sudo sh -c 'apt-get -o Dir::Etc::sourcelist="secsrc.list" \ -o Dir::Etc::sourceparts="-" update && \ apt-get --assume-no upgrade' . Maybe there is a possibility to workt together with this the command abbove ? So that i only need to download the security updates , and becouse it is a company servers i cant just shutdown rest of the reposotory .

marked as duplicate by Rinzwind, g_p, Eric Carvalho, Elder Geek, Fabby Jan 30 '15 at 13:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please tell us, what you already tried. Not only can we than avoid posting answers that you already tried unsuccessfully, we also might find a way to make your previous attempts work. – Adaephon Jan 28 '15 at 9:57
  • see askubuntu.com/questions/194/… – Rinzwind Jan 28 '15 at 10:01
  • Bte I am a noob on linux / ubuntu . Tried (sudo apt-get upgrade but this only upgrade the existing software , Tried this with no result apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install , Also tried this sudo sh -c 'grep ^deb /etc/apt/sources.list |grep securi >> /etc/apt/sources.security.repos.only.list' with no result. The only option i see left i manualy download the updates and then sort them out. – Ariejan Jan 28 '15 at 10:06
  • I already saw that article . sudo sh -c 'apt-get -o Dir::Etc::sourcelist="secsrc.list" \ -o Dir::Etc::sourceparts="-" update && \ apt-get --assume-no upgrade' . Maybe there is a possibility to workt together with this the command abbove ? So that i only need to download the security updates , and becouse it is a company servers i cant just shutdown rest of the reposotory . – Ariejan Jan 28 '15 at 10:24
  • Please, add the content of the last two comments in the queston. The y are unreadable like they are now, and even if you have had your answer, you should think in future newbies ;-) – Rmano Jan 28 '15 at 11:26
22

Is it possible to only install the security updates?

Answer is : yes.

You can use unattended-upgrades which can handle automatic installation of security upgrades in Ubuntu system. Running sudo unattended-upgrade will install all the security package available for upgrade.

Install this package if it isn't already installed using

sudo apt-get install unattended-upgrades

To enable it type

sudo dpkg-reconfigure  unattended-upgrades

and select "yes".

You can also use it with the cron to schedule(weekly, monthly) an automatic security update.

See the Official Ubuntu Documentation for a comprehensive explanation

Just as a side note: If you have several machine, I would suggest you to create a local repository so that you will not need to download same package again and again in several machine. See here.

  • Tried and it works . But does it automatic install it or need i run the sudo unattended-upgrade to install it. And thanks for al your help :) – Ariejan Jan 28 '15 at 11:15
  • 1
    Second command will configure it to download and install stable security update automatically. No need to download manually. – g_p Jan 28 '15 at 11:24
  • Is there a way to do this just with apt-get? – jpaugh Dec 1 '16 at 21:12
  • 1
    @jpaugh, as per my knowledge, there is no such feature in apt-get that can automate the update process. – g_p Dec 2 '16 at 3:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.