Ubuntu Kernel Cleaner

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

cleanKernel-02

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”

cleanKernel-03

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.

cleanKernel-01

* 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

Enjoy it.




One comment:

Leave a Reply