Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Kernel Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th December 2006, 14:03
tdebruin tdebruin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default De-installing a self-compiled ubuntu kernel

After succefully compiling a new Ubuntu Kernel thanks to the tutorial at http://www.howtoforge.com/kernel_compilation_ubuntu,
I wanted to remove that kernel for some reason (forgot to compile some option I needed).
In the past I had compiled kernel in the old-school debian way, but now that I had installed the kernel via the make-kpkg and dpkg -i commands I thought I could remove it the same way:
Code:
dpkg -r linux-image-2.6.19-custom.deb
But I had to discover that dpkg does not work this way. So my humble question is: is it just simply safe to remove manually the files corresponding to my self-compiled kernel? First I ensured I am now using another kernel with
Code:
uname -r
Then I went to the /boot/ directory and removed the different files:
Code:
cd /boot/
sudo rm initrd.img-2.6.19-custom
sudo rm System.map-2.6.19-custom
sudo rm vmlinuz-2.6.19-custom
Then I also removed the .deb package in /usr/src, as well as the kernel headers:
Code:
cd /usr/src/
sudo rm -rf linux-headers-2.6.19-custom
And then do a
Code:
sudo update-grub
to make sure Grub knows this kernel doesn't exist anymore.

I'm asking the question because I sense that some people may end up with several useless kernel-images laying around on their hard drive not knowing how to remove them safely.
Reply With Quote
Sponsored Links
  #2  
Old 13th December 2006, 13:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Try
Code:
apt-get remove linux-image-2.6.19-custom
But you can simply compile a new kernel (use custom1 instead of custom) and install that one so that linux-image-2.6.19-custom won't be used anymore.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 13th December 2006, 23:56
tdebruin tdebruin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Thumbs up apt-get remove indeed

Aha, apt-get remove did indeed clean my disk in a more elegant way than manually deleting things here and there.

I'd already made another kernel, but I wanted to make sure that this was the safe way to clean up my HD, thinking that more people like me otherwise maybe keep all sorts of different stale kernels on their HD by fear of not removing them in the proper way.

Thx for the quick answer.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Xen 3.0.2 /3.0.3 | No Swap in DomU Merc HOWTO-Related Questions 10 27th March 2007 11:40
Fedora Core 5 - Server not responding kyriakos Installation/Configuration 13 16th November 2006 14:16
WG311v2 almost working with Edgy (w/o ndiswrapper) need help with the rest caudata Server Operation 11 13th November 2006 20:02
Questions about ubuntu ISP-Server Setup badgerbox76 HOWTO-Related Questions 15 5th March 2006 14:41


All times are GMT +2. The time now is 11:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.