On Sat, 24 Feb 2018, Todd Zullinger wrote:

> Ed Greshko wrote:
> > On 02/24/18 15:32, Robert P. J. Day wrote:
> >>   not sure why i never noticed this before, but even though
> >> updating my fedora box keeps only the last three versions of the
> >> kernel, i have a couple dozen /lib/modules directories each
> >> representing an older version of the kernel going back to
> >> 4.11.12, and when i examine all those old directories, they
> >> contain nothing but:
> >>
> >> 4.11.12-200.fc25.x86_64
> >> │   └── misc
> >> │       ├── vboxdrv.ko
> >> │       ├── vboxnetadp.ko
> >> │       ├── vboxnetflt.ko
> >> │       └── vboxpci.ko
> >>
> >> ... etc etc ...
> >>
> >>   i'm sure i'm safe to manually remove all those older
> >> /lib/modules, but should i be surprised that they're even there?
> >> is there something i can configure about virtualbox to not have
> >> it lock those old directories in place?
> >
> > Sounds more like the kernel removal process than anything related
> > to virtualbox.
>
> It depends on how the Virtualbox modules are installed.  If they're
> via kmod/akmod packages, then when the corresponding kernel is
> removed the kmod-vbox-${kernel_uname} package should be removed,
> removing the files it installed.

  i honestly don't recall how they came to be there, but i rarely
install anything on my fedora system *not* via an actual .rpm package.

> I suspect that the vbox modules weren't installed via an rpm package
> -- or if they were, those packages lack a proper requirement on the
> kernel version they're built for, which leaves this cruft.
>
> Running:
>
>   $ rpm -qf /lib/modules/4.11.12-200.fc25.x86_64/misc/vboxdrv.ko
>
> would be useful in determining whether they're owned by any package.
> We know they don't come from the kernel rpm, so it's not it's job to
> clean them up (and it would be wrong if it did, of course).

  totally predictably:

$ rpm -qf /lib/modules/4.11.12-200.fc25.x86_64/misc/vboxdrv.ko
file /lib/modules/4.11.12-200.fc25.x86_64/misc/vboxdrv.ko is not owned by any 
package
$

  so, clearly, kernel removal comes along to remove the corresponding
/lib/modules directory, finds it still has content, and is forced to
leave it there. that's annoying. is there any option for kernel
removal to at least warn that it can't delete the /lib/modules
directory? not sure why i never noticed this before, i'll try to
recall how virtualbox ended up on this system.

rday
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to