How do I uninstall dkms modules if there are two of them ...
askubuntu.com › questions › 849547If you really want to uninstall the module for a particular kernel, you can refer to the dkms(8) manual:-k <kernel-version>/<arch> The kernel and arch to perform the action upon. You can specify multiple kernel version/arch pairs on the command line by repeating the -k argument with a different kernel version and arch. However, not all actions support multiple kernel versions (it will error out in this case).
DKMS module removed completely when last kernel removed ...
github.com › dell › dkmsNov 08, 2017 · /etc/kernel/prerm.d/dkms call (with dkms remove ... inside) completely remove all modules from dkms tree on kernel upgrade because it calls when new kernel headers are unavailable yet. As a workaround for specific module some additional directory can be created in $dkms_tree/$module/$module_version/ , for example /var/lib/dkms/mymodule/0.1/workaround_full_dkms_remove .