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?
|
|
||||
|
The package unattended-upgrades provides functionality to install security updates automatically. You could use this, but instead of configuring the automatic part you could call it manually. For this case, the following should do it quietly:
or more verbose version, for controlling how it goes
This assumes that the package is installed by default, which it probably is. If not, just do:
See also |
|||||||||||||||||||||
|
A Few Tips On How To Manage UpdatesThis applies both to Debian and Ubuntu, but more specific instructions for Ubuntu follow.
Notes:
|
|||||||||||||||||||||
|
|
replace
now a simple 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 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 |
|||||||||||||
|
|
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... |
|||||||||
|
|
The following is confirmed in Ubuntu 14.04 LTS. Use the Look at the file
Note how it has been configured to only allow unattended upgrades for security packages, by default. Modify the file
This will run automatic unattended security upgrades, once per day. Now, to run manually: To test as a dry-run, without doing anything: Source: https://help.ubuntu.com/14.04/serverguide/automatic-updates.html |
|||||||||
|
|
||||
|
|
|
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. |
|||||
|
linux-image-genericpackage, depending on the current image, eglinux-image-3.x.y-zz-generic(each version of which is a separate package name), dist-upgrade (which allows new packages to be installed to satisfy dependencies) will perform this upgrade, whereas upgrade will show the kernel package as held-back. – chronitis Nov 16 '12 at 14:25apt-getbased answers for this, considering how prominently it is listed on each server – Karthik T Oct 29 '13 at 1:30