~$ locate tp_smapi
/lib/modules/3.0.0-19-generic/updates/dkms/tp_smapi.ko
/lib/modules/3.2.0-26-generic/updates/dkms/tp_smapi.ko
/lib/modules/3.2.0-29-generic/updates/dkms/tp_smapi.ko
/usr/src/tp-smapi-0.41/tp_smapi.c
/var/lib/dkms/tp-smapi/0.41/3.0.0-19-generic/x86_64/module/tp_smapi.ko
/var/lib/dkms/tp-smapi/0.41/3.2.0-26-generic/x86_64/module/tp_smapi.ko
/var/lib/dkms/tp-smapi/0.41/3.2.0-29-generic/x86_64/module/tp_smapi.ko
/var/lib/dkms/tp-smapi/0.41/build/tp_smapi.c'
How to remove the 2 old Linux kernel modules from kernels 3.0.0-19 und 3.2.0-26?
~$ man dkms
"'dkms remove [module/module-version]' removes a module/version combination from a tree.'
What is a "[module/module-version]", please?
Please notice:
I do not want to remove old Linux kernel modules tp_smapi from a tree but I'd like to remove old Linux kernel modules from my Ubuntu 12.04.1 computer.
This has been tried on 10.04, 11.10, and 12.10. However ... I do not guarantee you if it will preserve your modules!
List your kernels with
Then just
On older versions of Ubuntu (not 12.04 onwards), you need to say "hi" to GRUB:
Actually an easier (for people who favor GUIs over command line) and apparently more thorough (it found and deleted header files "apt-get purge ..." missed) alternative is to just install Ubuntu Tweak.
Go to Janitor/System/Old Kernel, select it, and press "Clean".
Maybe you should see this link; it has good instruction except perhaps the grub update.
Or, more safely, open the Ubuntu Software Center then search for Linux Kernel Image. Make sure to show the technical terms (click on "Show Technical Terms" located on the lower left of the screen).
Then update grub with the command:
(# - root or administrative privileges)
Cheers! :)