Loading Search...

Saturday, June 28, 2008

remove old ubuntu kernel

after few times you do aptitude full-upgrade, you will end up with many kernel images. many people new to linux dont even know it's there. but it's there. and it can be many of them. wasting quite some spaces, especially if you're on old small 4gig harddrive, it matters a lot.

well... there're many ways you can remove old kernel on ubuntu. and here's my way..

first... find out which kernel installed:
aptitude search linux- | grep ^i

that will also show installed old linux-header (source). you might want to remove them too.
now let's remove them:
sudo aptitude purge linux linux-headers-2.6.24-16-server linux-image-2.6.24-16-server linux-ubuntu-modules-2.6.24-16
sudo aptitude purge linux linux-headers-2.6.24-17-server linux-image-2.6.24-17-server linux-ubuntu-modules-2.6.24-17
that's all it.
that should reclaim at least few hundreds megs space.

guess what... it also works on debian and all distros based on these two.

update. shorter, easier...

sudo apt-get purge '.*-2.6.24-16-*' 
sudo apt-get purge '.*-2.6.24-17-*' 


--
tips & tricks on computers and gadgets
denny on IT ; let's doIT
Your Network & Internet Solutions

3 comments:

buy youtube views said...

We appreciate the mention, Melanie. And bravo on a well-written article.

of mesothelioma said...

I realy Like Your site.I found it on google.Hope I will keep visting again.

kasimo011 said...

I really appreciate communities that are this impactful on the projects.