Comment 13 for bug 1089195

Revision history for this message
B. (b-deactivatedaccount-deactivatedaccount) wrote :

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