Clean up Your Boot Partition Ubuntu

If you constantly run out of space in the boot partition, you might need to run the following command to cleanup the boot partition.

First, list all installed kernels

dpkg -l linux-image-* | grep ii

Second, delete the chosen old kernel

apt-get purge linux-image-4.4.0-XXXX*

Other command worth noting:

apt-get autoremove


apt-get --purge autoremove

You can also remove the old kernel manually. I suggest leaving the older one and the latest.
Delete the kernels in between.