10

I have 2 dkms modules are in same version:

$ dkms status
rtl8812AU, 4.3.14, 4.4.0-45-generic, x86_64: installed
rtl8812AU, 4.3.14, 4.4.0-47-generic, x86_64: installed

When I tried dkms uninstall -m rtl8812AU -v 4.3.14 it uninstalled the second one. How do I uninstall the first one? Thanks!

4
  • Don't you want both installed so you can boot either kernel? Nov 15, 2016 at 1:15
  • The thing is my wifi adapter is not working now, just after I update the OS. Would like to try uninstalling one to see whether it will work again. Nov 15, 2016 at 1:33
  • What do you really want? Do you want to uninstall both? These are two builds of the same module.
    – Pilot6
    Nov 15, 2016 at 10:49
  • I doubt that will help. See my answer for why that doesn't do what you seem to think. If you want help with your wireless adapter problem please open a new question and include the output of lspci -nnk | grep -A2 Network or better yet run the network diagnostics. Nov 15, 2016 at 10:49

2 Answers 2

24

To remove the module for all kernels you can run

sudo dkms remove rtl8812AU/4.3.14 --all
1
  • --all is not supported on older versions of dkms. I.E. Ubuntu 14.04 gives Error! The action does not support multiple kernel version parameters on the command line.
    – Tino
    Jul 17, 2017 at 14:59
14

You don't have two DKMS modules. You have one DKMS module built and installed for two different kernel versions.

As a rule of thumb you shouldn't manually uninstall DKMS modules for kernels that are still installed unless you have a specific reason. (There’s no need to manually uninstall modules for kernels removed through the package manager as DKMS already takes care of that via package removal hooks – assuming the kernel was packaged correctly.)


If 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). The arch part can be omitted, and DKMS will assume you want it to be the arch of the currently running system.

So the command to uninstall the module in question for kernel 4.4.0-45-generic is:

dkms uninstall -k 4.4.0-45-generic rtl8812AU

You can omit the module version since you can't install multiple versions of a module for the same kernel anyway.

2
  • Small typo in "So the command to install".
    – DK Bose
    Jul 7, 2017 at 1:25
  • @DKBose: I don't see any. I think you have enough reputation to fix it yourself though. ;-) Jul 7, 2017 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.