I’m writing this as much a reminder to myself as a help for others. DKMS is a great tool. It really makes getting drivers in and out of Linux a much easier process than it previously was.
I guarantee if you mess with WiFi hacking, you will be dealing with drivers at some point in time, so here is what I know:
The first thing to do is get the status of what is installed:
$ dkms status
From here you should get a response that looks something like this:
8812au, 4.2.3, 5.3.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!)
It may be blank, or there may be multiple items, but in this case, this is all I had there.
The next step is to remove the item. The two pieces of info you need to take from the list are the name of the driver (8812au in this case) and the version number (4.2.3 in this case). You will then format your command this way:
$ sudo dkms remove 8812au/4.2.3 --all
At this point you will get a whole bunch of text looking something like this:
-------- Uninstall Beginning -------- Module: 8812au Version: 4.2.3 Kernel: 5.3.0-23-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. 8812au.ko: - Uninstallation - Deleting from: /lib/modules/5.3.0-23-generic/ rmdir: failed to remove '': No such file or directory - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod…. DKMS: uninstall completed. ------------------------------------- Deleting module version: 4.2.3 completely from the DKMS tree. ------------------------------------- Done. wonko@wifiwasp:~$ 8812au, 4.2.3, 5.3.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!) -bash: !: event not found
I would recommend running the sudo dkms status
command again just to confirm that the driver is removed. You can then proceed to add in the new driver.