Comment 56 for bug 1267059

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

# This will simulate the removal of useless packages linked to old kernels
dpkg --get-selections 'linux-*.*.*-*' | grep $'\t''install' | cut -f1 \
| grep -vF "$(uname -r | cut -d- -f1,2)" \
| grep -vF "$(dpkg --get-selections 'linux-*image*' \
| grep -E '^[^0-9]+'$'\t''install$' | cut -f1 | xargs -r apt-cache depends \
| grep -oE '[0-9.]+-[0-9]+' | sort -u)" | xargs -r apt-get --dry-run purge