Code: Select all
sudo apt-get purge $(dpkg --list |egrep 'linux-image-[0-9]' |awk '{print $3,$2}' |sort -nr |tail -n +2 |grep -v $(uname -r) |awk '{ print $2}')
Code: Select all
sudo apt-get autoclean && sudo apt-get autoremove
Code: Select all
sudo apt-get purge $(dpkg --list |egrep 'linux-image-[0-9]' |awk '{print $3,$2}' |sort -nr |tail -n +2 |grep -v $(uname -r) |awk '{ print $2}')
Code: Select all
sudo apt-get autoclean && sudo apt-get autoremove
There's no reason not to proceed if you need the space or want to clean up.