И теперь, самое время - почистить то, что мы насорили в системе, экспериментируя с DKMS...
- Деинсталлировать модуль из системы:
Код: Выделить всё
olej@R420:~/2022/own.BOOKs/BHV.kernel/examples$ sudo dkms uninstall -m hello_printk -v 3.1
-------- Uninstall Beginning --------
Module: hello_printk
Version: 3.1
Kernel: 5.4.0-122-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
hello_printk.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.0-122-generic/kernel/lib/hello_printk//
- 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.
olej@R420:~/2022/own.BOOKs/BHV.kernel/examples$ ls -l /lib/modules/`uname -r`/kernel/lib/hello_printk
ls: невозможно получить доступ к '/lib/modules/5.4.0-122-generic/kernel/lib/hello_printk': Нет такого файла или каталога
Код: Выделить всё
olej@R420:~/2022/own.BOOKs/BHV.kernel/examples$ sudo dkms remove -m hello_printk -v 3.1
Error! Invalid number of parameters passed.
Usage: remove <module>/<module-version> --all
or: remove <module>/<module-version> -k <kernel-version>
Не так!
А вот так:
Код: Выделить всё
olej@R420:~/2022/own.BOOKs/BHV.kernel/examples$ sudo dkms remove hello_printk/3.1 --all
-------- Uninstall Beginning --------
Module: hello_printk
Version: 3.1
Kernel: 5.4.0-122-generic (x86_64)
-------------------------------------
Status: This module version was INACTIVE for this kernel.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 3.1
completely from the DKMS tree.
------------------------------
Done.
Код: Выделить всё
olej@R420:~/2022/own.BOOKs/BHV.kernel/examples$ dkms status
virtualbox, 6.1.34, 5.4.0-121-generic, x86_64: installed
virtualbox, 6.1.34, 5.4.0-122-generic, x86_64: installed