dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge
Created
November 30, 2016 19:33
-
-
Save daveaspinall/303fc800fb5cdef39400530e05f5f257 to your computer and use it in GitHub Desktop.
Removes all outdated and unused kernels in Ubuntu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment