How to remove old Linux kernel modules »tp_smapi«?

27,597

Solution 1

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

dpkg --list | grep linux-image

Then just

sudo apt-get purge [image name(s) from the list]*

On older versions of Ubuntu (not 12.04 onwards), you need to say "hi" to GRUB:

sudo update-grub2

Solution 2

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".

Solution 3

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:

user#: sudo update-grub

(# - root or administrative privileges)

Cheers! :)

Share:
27,597

Related videos on Youtube

user43816
Author by

user43816

Updated on September 18, 2022

Comments

  • user43816
    user43816 almost 2 years
    ~$ 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.

    • BuZZ-dEE
      BuZZ-dEE almost 12 years
      Why do you want to remove those modules? Which module-version is in use? You can see it with "modinfo tp_smapi"
    • user43816
      user43816 almost 12 years
      '~$ modinfo tp-smapi filename: /lib/modules/3.2.0-29-generic/updates/dkms/tp_smapi.ko license: GPL version: 0.41 description: ThinkPad SMAPI Support author: Shem Multinymous srcversion: B6841670771B2FF5222BFFD depends: thinkpad_ec vermagic: 3.2.0-29-generic SMP mod_unload modversions parm: debug:Debug level (0=off, 1=on) (int)'
    • user43816
      user43816 almost 12 years
      1. To get less unwanted responses when I am grepping. -- 2. To save space on my hard disk. -- 3. To tidy up my hard disk.
  • Fred Hamilton
    Fred Hamilton over 11 years
    On my 12.04 system, grub was automatically re-run, so no need to do the third step (sudo update-grub2).
  • key_
    key_ over 10 years
    some more cleanup: dpkg --list | grep linux-headers sudo apt-get purge [packagename from the list]