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).
Try the unattended-upgrades or any of the other methods listed here. It can be used to configure automatic security updates (I believe it's used when asked during the installer) as well as other upgrades automatically. See the man pages for more details.
If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.
These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)
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:
Edit the latter to contain only security repositories, then:
Tadaaaa... Scriptable stuff.
Try the
unattended-upgrades
or any of the other methods listed here. It can be used to configure automatic security updates (I believe it's used when asked during the installer) as well as other upgrades automatically. See the man pages for more details.If you are just looking to do this quickly once, instead of creating a separate repository and scripting up some automation and all that. Great if you aren't supposed to be making changes while auditing a system or whatever.
These two commands will spit out the list. Pipe to wc -l to see how many are behind. ;-)
Still valid for older distros or if you have update repos off, but security on:
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.
What I do: