The following is taken from https://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu
When the /boot partition hits 100%, apt-autoremove does not work. To free up enough space on the boot partition to get apt-autoremove to work:
- uname -r
- remember this version – we do not want to remove it
- EX: 4.4.0-151-generic
- dpkg –list ‘linux-image-*’
- remove all but the version listed in step 1 via
- sudo dpkg –purge linux-image-extra-4.4.0-127-generic
- sudo dpkg –purge linux-image-4.4.0-127-generic
- until sudo apt-get install -f works
- sudo apt autoremove