Deleting old kernel

If you are like me and like to have a separated /boot partition, it’s probable that times in time you end up running out f space to install new kernel versions.

To solve such type of problem you have to delete old versions you are not using any more.

To be easy to do that I prepared a one line command that do what you need.

dpkg -l | egrep "linux-(signed|modules|image|headers)" | grep -v $(uname -r | cut -d - -f 1) | awk {'print $2'} | xargs sudo apt purge -y

Enjoy!

--

--

Professional with more than 10 years of experience in network management, working in large networks with multiple vendors and technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Igor Iglesias

Professional with more than 10 years of experience in network management, working in large networks with multiple vendors and technologies.