Red Hat Bugzilla – Bug 995086
cleaning up /lib/modules/<kernel>
Last modified: 2013-09-05 13:57:30 EDT
Description of problem:
Not sure whether this is a bug or "just the way it is", but today I found that I have several /lib/modules/<kernel> directories, with no modules left in there, i.e just an empty extra subdirectory, and things like modules.alias, modules.dep, modules.symbols, and their corresponding .bin files.
This only on systems where I either have VirtualBox or the Nvidia modules nstalled. Who is supposed to clean them up, when I yum remove the kernel and kernel-devel packages?
Version-Release number of selected component (if applicable):
All going back to where I started using those modules. On one of my systems all the way back to 3.5.0-2.fc17.x86_64, and including around 40 kernels my system had from then on.
Always, I guess
Steps to Reproduce:
1. Install VirtualBox and/or the Nvidia driver
2. Maybe install kmod/akmod packages for the above
3. Upgrade your system to a new kernel, yum erase the old one
/lib/modules/<old_kernel> not erased, but not much useful left there
Removal of /lib/modules/<old_kernel>
In my computer there are over 27 kernel modules directories with a size of 382M.
I also have akmod-VirtualBox, kmod-VirtualBox and bumblebee-nvidia(nvidia related). Additionally in my case I found that inside many of the /lib/modules/kernelversion/extra directories there was still the bbswitch.ko file(related to bumblebee and bumblebee-nvidia through the bbswitch package).
There's nothing rpm/yum can do to clean up the directories when it removes the kernels if other packages are placing modules there. Wherever you got these third party modules from should fix their packages to clean up properly.
Fedora doesn't provide or support third party module packages.