Safest way to clean up boot partition
Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
Case I: if /boot is not 100% full and apt is working
1. Check the current kernel version
sudo uname -r 3.19.0-64-generic2. Remove the OLD kernels
sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`linux-image-3.19.0-25-generic
linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-25-generic
linux-image-extra-3.19.0-56-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-genericCase II: Can't Use apt i.e. /boot is 100% full
apt i.e. /boot is 100% full1. Get the list of kernel images
2. Prepare Delete
3. Clean up what's making apt grumpy about a partial install.
4. Autoremove
5. Update Grub
6. Now you can update, install packages
Last updated