My workaround: dpkg --get-selections | grep 'linux-' dpkg --get-selections | awk '/linux-(headers|image)-[0-9]\./ { print $1 }' | grep -v "$(uname -r | sed -e 's/-generic//')" | sort -r -V -t- -k3 | tail -n+4 | xargs -r apt-get -qq -y purge apt-get -qq -y install linux-{headers,image}-$(uname -r) dpkg --get-selections | grep 'linux-'
# (optional) # apt-get -qq -y install linux-{headers,image}-generic-lts-utopic 2>/dev/null || apt-get -qq -y install linux-{headers,image}-generic-lts-trusty
Until a backport is available for LTS 14.04/12.04 see https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1267059
My workaround: (headers| image)- [0-9]\. / { print $1 }' | grep -v "$(uname -r | sed -e 's/-generic//')" | sort -r -V -t- -k3 | tail -n+4 | xargs -r apt-get -qq -y purge headers, image}- $(uname -r)
dpkg --get-selections | grep 'linux-'
dpkg --get-selections | awk '/linux-
apt-get -qq -y install linux-{
dpkg --get-selections | grep 'linux-'
# (optional) headers, image}- generic- lts-utopic 2>/dev/null || apt-get -qq -y install linux-{ headers, image}- generic- lts-trusty
# apt-get -qq -y install linux-{
Until a backport is available for LTS 14.04/12.04 see /bugs.launchpad .net/ubuntu/ +source/ unattended- upgrades/ +bug/1267059
https:/