Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 06-05-2004, 10:38 AM   #1
Registered: Mar 2004
Posts: 70

Rep: Reputation: 15
Removing old kernel and other packages installed

Hi guys,

Alright, i guess its time i clean up my system.
Now my question is how do i go about it and wat are the things to take note of.

I have some old version kernels to removed(installed them through packages both kernel-source and kernel).

Also have samba which I am not using at the moment... and wished to removed it and reconfigured all over again.

Thanks in advance
Old 06-05-2004, 09:40 PM   #2
LQ Guru
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,873

Rep: Reputation: 317Reputation: 317Reputation: 317Reputation: 317
"I have some old version kernels to removed(installed them through packages both kernel-source and kernel)."

Issue the command:
uname -r

which will tell you the name of the kernel that you are running on. Then go into /boot and delete every kernel other that the one you are running on.

Each kernel has a directory in /lib/modules containing the loadable kernel modules. There will be a directory called /lib/modules/your-kernel-name. That is part of the kernel that you are running on. You can delete every other directory in /lib/modules.

You also have initrd and files in /boot. Some of these may belong to the kernels that you are deleting. If so then delete the initrd and files that correspond to the kernels that you delete, but of course retain the initrd and that belong to the kernel that you are running on.

Any obsolute kernels that you installed with rpm you can remove with:
rpm -e package-name
You can do so even if you have already deleted the package's files in /boot and /lib/modules.

Of course, if you accidently delete a file that you need then you are screwed which is why you back everything up to tarballs on CD-RW before you start deleting files and also make sure that you have a working rescue CD.

Be prepared. Create a LifeBoat CD.

Steve Stites


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fc3 problems removing installed packages. gSalsero Fedora 4 12-13-2004 09:53 AM
removing certain packages Smokey Red Hat 1 10-02-2004 07:55 PM
Help! Installed the i686 kernel & glibc packages instead of the i386 version penguin_powered Linux - Newbie 3 04-11-2004 11:45 PM
removing packages robson8112 Linux - General 3 01-21-2004 03:34 PM
"No kernel packages were installed... Boot loader will not be changed..." error messa ptexpress Linux - Newbie 1 11-03-2003 03:54 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration