Wednesday, May 09, 2018

Deleting Old Kernels


This is how I'm deleting old kernel nowadays.
The idea is to do it easily, but most important, safely.

First off, get the running kernel, never delete this one ;)

uname -a

And then get the list of all the installed kernels (and related stuff):

dpkg --get-selections | grep linux-headers && dpkg --get-selections | grep linux-image

This is a sample list of the output of the above:



And then, simply delete the ones you don't like:

sudo apt-get purge linux-image-4.4.0-119-generic\
 linux-headers-4.4.0-119-generic linux-image-extra-4.4.0-119-generic

In this case, deleting the kernel 4.4.0-119 and all related files.

Labels: , , , ,

0 Comments:

Post a Comment

<< Home