I recently saw a post on G+ about a new user that just recently moved from Windows 7 to Ubuntu Linux and not knowing all the ins and outs he let the installation configure the file-system as default leaving very little space available in /boot everytime there is a new kernel update he could not apply due to lack of space, so I created a nice and easy little script (Tested on Ubuntu 14.04.4 LTS, Trusty Tahr) and will do just the job
Download the file or re-type it yourself (be careful with typos and then you will see.
The script will check to see if there is more that a single version of the kernel, if there is he will move the oldest version only, if you have multiple you can run the script again until the output is “Only single version of Kernel File”
Here is a quick screenshot of the full process showing current number of files before running the script, running the script and then post completion.
* Download the script cleanKernel.sh script
* Save the file somewhere of your preference
* Extra tar file $ tar xvf cleanKernel.tar
* Execute using sudo $ sudo ./cleanKernel.sh