Not enough space on boot partition
When your ubuntu distribution is installed using the LVM partition system, you can run into an issue while performing updates and upgrades of the distribution because, at some points, the /boot
partition becomes too small. This results in messages of this type:
Not enough free disk space The upgrade has aborted. The upgrade needs a total of 617 M free space on disk '/boot'. Please free at least an additional 282 M of disk space on '/boot'.
When this happens,
- check the content of your
/boot
partition (withls /boot
) and remove all unused kernels. This can be performed withsudo apt autoremove --purge
or, if you have old kernels and images, this sometimes require that you remove them one by one by removing thelinux-headers-...
andlinux-images-...
packages along with the remaining files in/boot
; - if this is still not enough, edit (as sudo) the file
/etc/initramfs-tools/initramfs.conf
and change the lineCOMPRESS=lz4
toCOMPRESS=xz
and runsudo update-initramfs -u -k all sudo apt autoremove --purge
This should be enough to solve the problem.