How to fix Low disk space on "boot"

A common issue is when /boot partition is full. You receive the following message:

"Low disk space on "boot". The volume "boot" has only 0 bytes disk space remaining"

To fix it, you must delete old kernels.
First, you must list all of them and I recomend remove the oldest and keep the last two newest (if you have problems with the last, you can use the other).

To list all of them, use this command:

# dpkg -l linux-image-\* | grep ^ii | awk '{print $2}'

Now, you must purge the oldest kernels with the following command:

# sudo apt-get purge linux-image-4.13.0-{36,37,38}-generic

You need to change the values according to the values you have.
Finally, update grub

# sudo update-grub

Enjoy it!


Popular posts from this blog

from: can't read /var/mail/ in Python scripts

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04

How to install a WhatsApp bot based on Python