Removing dkms-built modules for old kernel versions
I'm aware that as new kernels are installed on `apt-get dist-upgrade'
old ones aren't removed and must be done manually, e.g.
sudo apt-get purge linux-image-
However, this doesn't clean up modules that dkms has built for those
kernels.
$ dkms status
nvidia-current, 260.19.06, 2.6.35-31-generic, x86_64: installed
nvidia-current, 260.19.06, 2.6.35-32-generic, x86_64: installed
nvidia-current, 260.19.06, 2.6.35-30-generic, x86_64: built
nvidia-current, 260.19.06, 2.6.35-28-generic, x86_64: built
nvidia-current, 260.19.06, 2.6.35-27-generic, x86_64: built
nvidia-current, 260.19.06, 2.6.35-22-generic, x86_64: built
$
What's the right, clean, complete way to purge these too? Is it
sudo dkms remove -m nvidia-current -v 260.19.06 \
$(printf -- '-k %s\n' 2.6.35-
Aside: Is there anything else that may linger for each old kernel that
needs manual clean-up? I didn't find much suggesting the `dkms remove'
was needed amongst the `remove your old kernel' blog posts and HOWTOs so
perhaps there are other non-dkms things you happen to know of.
Also, it seems a shame there's not a package one can install and
configure to keep the last N kernels and purge older ones as new ones
are installed. Then only it would need to know of all the things that
need doing.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu dkms Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ralph Corderoy
- Solved:
- Last query:
- Last reply: