dkms install should write a manifest of the actually installed module files.
There may be less modules getting installed than were built if the kernel already has a newer version of some modules.
If such a manifest exists, use it instead of regenerating the list of modules to be removed.
Regenerating the list requires dkms.conf and modinfo access to the built modules.