Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just wondering... if I have installed two or three kernels for various reasons, how do I remove one of them?
Do I just delete the contents of /lib/modules/2.6.15....? Am I at risk of doing damage? Right now I have the original kernel from installing FC5 which is 2.6.15-1.2054 and I downloaded another kernel with patches in it so I could install and run ndiswrapper so I can use my wireless card. I only boot into the kernel with the patches so can I delete the original kernel and just keep the one that I am using, and if I can delete it, is it as easy as removing its directory from /lib/modules?
I downloaded a kernel with patches in the form of a xxx.xxx.xx..src.rpm then
rpmbuild -bb /usr/src/redhat/kernel-2.6.15.spec and then compiled, built, blah blah
the kernel. It wasn't a flat out rpm that installed itself. I had to build from source.
The kernel I want to remove is the default kernel that was installed with FC5 which
I believe is 2.6.15-1.2054.
I tried to remove it with: rpm -e kernel-2.6.15-1.2054_FC5 and got some dependency errors.
I just want to remove the original kernel. So would deleting the directory 2.6.15-1.2054_FC5 from /lib/modules do any harm?
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
You should be able to remove the rpms by do the same steps but backwards from the way you did the install. Last step first.
Got me a bit confused but to remove manual this and that goto the following areas.
/lib/modules and remove the module directories attached to the kernel you wish gone.
/boot and remove the system.map, vmlinuz, and init attached to kernel you wish gone.
edit /boot/grub/grub.conf and remove the kernels you do not need installed.
/usr/src/redhat/ BUILD, RPMS, SRPMS, SPECS, SOURCES and travel through them and remove what is needed.
Now doing the above is all manual removal. This does not remove the info from the rpm database. So the rpm tools will still always beleive it to be there if they were installed as RPMs.
Now if you check the manpages on the rpm command ' man rpm '. You will see option like --force and --nodeps. If you used the --force with -e to remove the rpm it will remove it no matter if the data base so it can or not. Only issue it may cause dependiency issues with other packages. This can be a big pain to to get fixed. One of the issues with RPMs. Use at your own risk. Before trying I would learn all that can be learned about the RPM system. There more info than I can write about it in this single post.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.