3

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?

robni
  • 904
  • 2
  • 6
  • 20
  • 1
    Can you please post the output of pacman when installing a newer kernel? Are you sure that the module's DKMS tarball or folder is not present in the ```/usr/src``` directory? And also ```/var/lib/dkms/``` ? – Parsa Mousavi Jul 24 '20 at 11:01

1 Answers1

7

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

knatter
  • 71
  • 1
  • 3
  • Thanks! I'm new to Ubuntu, and this saved a lot of headache for me. – Aditya Singh Mar 08 '22 at 04:33
  • Is it necessary to `rm /var/lib/dkms/{module}` too or is that what the `dkms remove` cmd is essetially doing? – tijko Sep 15 '22 at 16:34
  • In my case, I have to delete `/var/lib/dkms/{module}` as some module version won't be deleted with command `dkms remvoe {module}/{version} --all` – xiaojueguan Mar 17 '23 at 01:15