Wednesday, June 29, 2016

Ubuntu software update can not run due to insufficient disk space

This one-liner does the clean up:
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge

(source)