I am currently running Ubuntu 12.10 which is the latest release at the time of posting this.

I have had the issue after recent updates where my Boot drive has become full, When setting this machine up I let it decide it’s own partition sizes so I thought it was quiet odd that in less than 3 months this disk had become full.

 

I have done a bit of googling and tested this method (To be clear I did not come up with it) but it definitely worked for my machine as I have tested it and am blogging about it here so that I do not loose the code.

 

I ran “dpkg -l ‘linux-image-[0-9]*’ | grep ‘^ii’ | grep -v `uname -r` | awk ‘{print $2}’ | xargs sudo apt-get purge -y #”

 

This took around 1 minute. It cleared around 254mb from the Boot disk and I no longer get the low disk space warnings I was receiving before running the script.

Hopefully this will be useful to someone else (if not myself) at a later stage

Advertisements