Identify that you have this problem checklist
This is very important: Applying this fix is a wast of your time if that is not your problem.
Become root with sudo (Terminal A & B)
If you are not logged in as root
via ssh already:
sudo -i
Do this in both terminals.
Empty the existing images (Terminal A)
First, decide which kernels are no longer needed:
cd /boot
ls -hasl
Second, assuming we have multiple versions of the 4.15.0
kernel, for example (160, 163, 166, 167, 169)
Remove old kernels (Terminal B)
The simplest way is to have apt remove old versions for us:
Now apt
can remove all unused kernels not just the 4.15.0-*
ones.
Cleanup old empty files (Terminal A)
Cleanup & Future
Leave the root shells with exit
or Ctrl + D
and enjoy that you fixed a system.
Consider this command for updating your system in the future and avoid having this problem again:
df -h && apt update && apt dist-upgrade && apt autoremove