I have a dkms module. I wanted to remove it. I did sudo dkms remove .... But when I update to a newer kernel, my package manager tries to build that module and failed, so it added it again.
How do I prevent that and remove the module?
To remove the module, you need to run sudo dkms remove modul/version --all to prevent it from being rebuilt during the next update, you must also remove the sources under /usr/src/.
here is an example of how to remove akvcam module
dkms status
akvcam, 1.2.0, 5.12.14-arch1-1, x86_64: installed
sudo dkms remove akvcam/1.2.0 --all
sudo rm -rf /usr/src/akvcam-1.2.0/
sudo rm /etc/modprobe.d/akvcam.conf
good luck marco manngatter
rm /var/lib/dkms/{module} too or is that what the dkms remove cmd is essetially doing?
/var/lib/dkms/{module} as some module version won't be deleted with command dkms remvoe {module}/{version} --all
Commented
Mar 17, 2023 at 1:15
Cleaning DKMS To clean DKMS, you can use the command dkms remove <module-name> --all to remove all versions of the specified module. This prepares your system for a fresh reinstall. source
Reinstalling DKMS To reinstall DKMS, first make sure you have the DKMS package and the necessary kernel headers installed. You can do this with the command: sudo apt install dkms and sudo apt install linux-headers-$(uname -r). source
Rebuilding DKMS Modules After reinstalling, if you need to rebuild existing DKMS modules, use the command dkms build <module-name> followed by dkms install <module-name>. This ensures your modules are compatible with the current kernel.
just a continuation post for more help if a second issue occure.
/usr/srcdirectory? And also/var/lib/dkms/?