Proper way to remove a driver?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
MRK0017
Level 1
Level 1
Posts: 20
Joined: Mon Jun 05, 2017 1:15 pm

Proper way to remove a driver?

Post by MRK0017 » Sat Sep 22, 2018 7:02 am

I manually installed some drivers for my wifi adapter (RTL8812au).

I downloaded the driver from here: https://github.com/abperiasamy/rtl8812AU_8821AU_linux

And rtfm. It worked. The module is installed, and I can find it in /lib/modules/4.15.0-20-generic/kernel/drivers/net/wireless/rtl8812au.ko

But I noticed that this driver doesn't seem to work 100%. Sometimes when I turn on my computer I have to unplug the usb adapter and then plug it in again to make it work. I want to try another driver, because I had a similar problems some time ago on Windows 7 with another adapter, and I solved it by installing an updated driver manually.

What is the proper way to remove this driver? Can I just brutally delete the .ko file or is there a more elegant way to do so?

Also as a bonus, can I get some basic info on what happens when you do the part related to DKMS in the instruction and what DKMS actually is and what it does?

Thank you.

JeremyB
Level 19
Level 19
Posts: 9172
Joined: Fri Feb 21, 2014 8:17 am

Re: Proper way to remove a driver?

Post by JeremyB » Sat Sep 22, 2018 7:10 am

to remove, it depends on how you installed, if you did

Code: Select all

cd rtl8812AU_rtl8821AU_linux
make
sudo make install
Then to remove you

Code: Select all

cd rtl8812AU_rtl8821AU_linux
sudo make uninstall
And the driver will be gone
Dkms will compile a new driver when a new kernel is installed, without dkms after a new kernel you would have to reboot into the new kernel

Code: Select all

cd rtl8812AU_rtl8821AU_linux
make clean
make
sudo make install
And have to reboot again after those commands

Post Reply

Return to “Newbie Questions”