[arch-general] DKMS question around removal of kernel modules

Eli Schwartz eschwartz93 at gmail.com
Wed Jun 8 18:30:19 UTC 2016

On 06/08/2016 02:03 PM, Genes Lists via arch-general wrote:
> When I install a new kernel, I notice that DKMS removes previous kernel
> modules as well as adding them to the new kernel.
> In the real old days these were not removed at all - so removal is a
> good thing.
> The issue is that the old kernel is still running and until machine is
> rebooted the modules wont be available I would think.
> I wonder - Is there a way to mark the deletion to happen after the new
> kernel is booted ? 
> I may well be missing something of course.

Well, you'd think it would be nice if the actual kernel itself wasn't
removed until the machine is rebooted. Because not all the modules you
need were installed with dkms -- most of them come together with the
kernel. ;)

Note that any modules which are already loaded will be available, you
just can't modprobe a module that no longer exists on disk.


There is actually a task on the bugtracker for keeping old kernels:

This is probably the best solution -- also, I'm not sure how you'd get
rid of dkms modules after the fact, without a way of keeping track of
which modules are orphaned. That's kind of why the old service was
switched to a pacman hook in the first place.

Eli Schwartz

More information about the arch-general mailing list