Easy Understandable Way to Remove Old Kernels

ubuntu-logo32I have several servers where old kernels become a problem.  Generally either /usr or /boot fills up or runs out of in-nodes.  There are a couple of how-tos that give you a command line one-liner that will fix the problem; however, they are all very long and scary.  I would rather execute something that I can understand.  Thankfully, some kind soul has written a nice simple walk through here.  If you are having problems with old kernels piling up, I would suggest taking a look.

If you have to do this on multiple servers, you can simplify the process by just copying and pasting the package name from “dpkg –list | grep linux-image” into one large purge statement. Just remember not to remove your currently running kernel.

sudo apt-get purge linux-image-3.2.0-23-generic linux-image-3.2.0-48-generic linux-image-3.2.0-51-generic
This entry was posted in Linux, System Administration and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>