multiple /lib64/modules directories
Apparently, though unproven, at 02:11 on Tuesday 17 May 2011, Valmor de
Almeida did opine thusly:
> After a recent sync, I ended up with these two modules
> and others too. I expected the directory for the older kernel to be
> removed. Is this the case? Virtualbox was re-emerged after the sync
> therefore the modules for the newer kernel were created. The current
> kernel is 2.6.37-gentoo-r4 (and it is the only one on my system). Should
> the directory /lib64/modules/2.6.36-gentoo-r5/ still exist?
This is basic Linux stuff.
There is a /lib/modules/xxxx for each installed kernel binary.
Portage will never remove them as portage did not install them, they are
installed by the "make modules_install" target of the kernel build process,
which you always run manually outside of portage's control.
The vbox modules are also in those directories under misc/ but this comes with
a quirk. They are usually built by remerging virtualbox-modules or running
module-rebuild. Unlike most other ebuilds, these do not delete everything from
the last emerge and replace all files (you will still need all installed
modules for any installed kernels you still have). So, portage simply does not
remove things from /lib/modules/
In other words, what you have is exactly what you should have and things as
working as designed. To remove anything in /lib/modules, you must manually rm
Incidentally, the same goes for the various kernel files in /boot/.
> -> locate vbox* | grep modules
> -> equery list gentoo-sources
> [ Searching for package 'gentoo-sources' in all categories among: ]
> * installed packages
> [I--] [ ] sys-kernel/gentoo-sources-2.6.37-r4 (2.6.37-r4)
alan dot mckinnon at gmail dot com