up vote 6 down vote favorite
1
share [g+] share [fb]

How do you use apt-get to only install critical security updates on ubuntu?

We'd like to only upgrade packages that need to be upgraded for security reasons, without upgrading all other packages.

link|improve this question

47% accept rate
2  
There is a great answer to this on askubuntu askubuntu.com/questions/194/… – Iain May 16 '11 at 18:55
feedback

3 Answers

Try sudo unattended-upgrade: is used for automatic security updates (I believe it's used when asked during the installer); should be a manual method of invoking it. Try the man pages for it.

link|improve this answer
feedback

I read the apt-get man page carefully when I got tired of manually editing the sources.list every time I wanted to only apply security updates (that means the second time).

Figured this solution out:

sudo cp /etc/apt/sources.list /etc/apt/security.sources.list

Edit the latter to contain only security repositories, then:

sudo apt-get upgrade -o Dir::Etc::SourceList=/etc/apt/security.sources.list

Tadaaaa... Scriptable stuff.

link|improve this answer
feedback

I don't know if it will work, but apt has it's sources in /etc/apt/sources.list and/or /etc/sources.list.d/

Why not edit the file, and comment all lines that are not part of the security updates ?

The security lines for apt should be something like this:

deb http://security.ubuntu.com/ubuntu ..... ..... ...

Leave those lines alone and comment all the others.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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