Created
October 7, 2015 09:01
-
-
Save bburdiliak/213bce38e4b3240c4853 to your computer and use it in GitHub Desktop.
remove images and headers of old kernels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment