Remove all unused kernels with 1 command in debian based systems


Please shareShare on Facebook6Share on Google+2Tweet about this on Twitter4Share on LinkedIn0Share on Reddit0Digg thisShare on StumbleUpon20Share on VKBuffer this page

As you know, everytime there is an update for the kernel, the new kernel is installed while the old one is not automaticaly uninstalled, after several kernel updates you will find a large list of old kernels in the start terminalgrub menu . So if we got no problem with the new installed kernel, we can just delete the old ones.



In my previous post i did show you how to uninstall older kernel in Ubuntu. Today I will show you another command to remove unused kernels:

sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)


Is done.

{module post forum}