sudo apt-get upgrade installs all updates, not just security updates. I know that I can use Update Manager to select only important security updates, but is there a way to do this from the command line?
| |||||||||||
feedback
|
|
There is a package unattended-upgrades, which provides functionality to install security updates automatically. You could use this, but not configure the automatic part and call it manually instead, so the following should do it:
(assuming the package is installed by default, which is probably is) See also | |||
|
feedback
|
|
replace /etc/apt/preferences with the following:
now a simple apt-get upgrade will upgrade all security updates only. Why (and how) this works: The preferences file will pin all packages from ubuntu distribution to priority 50, which will make them less desirable than already installed packages. Files originating from security repository are given the default (500) priority so they are considered for installation. This means that only packages that are considered more desirable than currently installed ones are security updates. More information about pinning in the apt_preferences manpage. You can temporarily promote a certain distribution for updates with the --target-release option that works with apt-get and aptitude (at least) which will allow you pin certain releases so that they are eligible for upgrade. If you wish to use this for scripts only and not make it default for the system, you can place the rules in to some other location and use this instead:
This will make apt look for the preferences file from a non-default location. The preferences file given as an example doesn't apply to third party repositories, if you wish to pin those too you can use | |||||
feedback
|
|
I can't find an option in either apt-get or aptitude, however someone had the same question on SuperUser. The only response is:
No reply as to whether that worked however. | |||
feedback
|
|
Although its pretty ugly, you could disable all the repositories apart from the security repository and then do:
I haven't tested it, but in theory it would only find updates in the security repo and apply them... | |||||
feedback
|