Clean up that full ubuntu /boot drive

Without any kind of monitoring or alerting enabled, you may run into your /boot drive becoming full, and resulting in errors such as:

 

When your disk is at 100% full, it’s difficult to take the safe route and remove old kernels with apt-get. So the blunt way of fixing this is with rm -f.

The following 1 liner can help achieve this.

This command was derived from this gist: https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600  that does a great job reviewing the different checks that should be done, and how to achieve the same manually.

Advertisements

Leave a Reply