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 .
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).
linux - why can I not remove this dkms module? - Unix & Linux ...
unix.stackexchange.com › questions › 416912In case of normal operations gone wrong, you can always delete dkms add-ons by hand, with sudo or as root. Normally the modules sources are installed by make installunder /var/lib/dkms/in a directory with the corresponding name, probably named rtl...something. Just delete that directory. You have also to delete the corresponding compiled file module under /lib/modules/KERNEL_VERSION/updates/dkms/where KERNEL_VERSION is your current kernel.