TL;DR:
dpkg --list linux-{headers,image,modules,tools}-\* | awk '{ if ($1=="ii") print $2}' | grep -v -e "$(uname -r | cut -d"-" -f1,2)" | xargs sudo dpkg --remove # use dpkg to remove all but the currently running kernel version
sudo apt-get install -f # It's common for apt to be in a broken state after running out of space on /boot
sudo apt-get autoremove # It's really common for apt to be broken on a package that should have been removed
sudo apt-get install -y linux-generic linux-headers-generic linux-image-generic linux-tools-generic # just in case latest kernel was mysteriously removed (e.g. when you are not running the latest kernel)
sudo update-grub # just in case it was not done automatically by dpkg