[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to uninstall a kernel and *all* of its "dependencies"?

> How can I go uninstalling some of the unneeded kernels (particularly 
> the backports one which didn't meet my needs in the end) and make sure 
> that *everything* that got installed by their respective packages -- or 
> built against the particular kernel, such as my wireless and graphics 
> modules -- gets uninstalled as well? What is the "Debian way" of 

Good question.  I wish I could tell you "just dpkg -l linux-image\*" and
"aptitude purge" the kernels you don't like, but indeed in my experience
this tends to leave some cruft around (e.g. linux-headers, maybe some
modules compiled with module-assistant, ...).

What I do is:\
- dpkg -l linux-image\*
  to see which kernels I have installed and I want to remove.
- ls /boot
  to have a second opinion
- aptitude purge linux-image-<vers>
- dpkg -l '*<vers>*' | grep '^i'
  to see the packages whose name includes that kernel version and are
  still installed.  E.g.
     dpkg -l '*2.6.26-1* | grep '^i'
- aptitude purge them.  Before purging them, you may think a bit about
  it and if you think they really should have been removed
  automatically, then use `reportbug' accordingly.


Reply to: