Skip to content

Instantly share code, notes, and snippets.

@IslamAzab
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IslamAzab/d606e8e2d9a32a51f7f7 to your computer and use it in GitHub Desktop.
Save IslamAzab/d606e8e2d9a32a51f7f7 to your computer and use it in GitHub Desktop.

Original source link

List current installed kernels

dpkg --get-selections | grep linux-image

e.g.

islam@islam-laptop:~/work/bkam/backend$ dpkg --get-selections | grep linux-image
linux-image-3.11.0-26-generic			install
linux-image-3.13.0-34-generic			install
linux-image-3.13.0-35-generic			install
linux-image-3.13.0-36-generic			install
linux-image-3.13.0-37-generic			install
linux-image-generic-lts-saucy			install
linux-image-generic-lts-trusty			install

Remove the last installed kernel

sudo apt-get purge oldest-kernel 

e.g.

islam@islam-laptop:~/work/bkam/backend$ sudo apt-get purge linux-image-3.11.0-26-generic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment