Monday, June 10, 2013

how to free up /boot partition

My /boot partition went full and I'm not able to do any system upgrades
due to this.My following upgrade commands end up with failure messages.
sudo apt-get upgrade | sudo apt-get dist-upgrade
After reading some articles on http://askubuntu.com, I found this command to remove all kernels and headers, excluding current running kernel.
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")