Re: What to do with multiple kernel images
> Thanks, I ran purge on the four oldest. Three of them reported an error:
>
> rmdir: failed to remove `/lib/modules/2.6.22-3-486': Directory not empty
> dpkg - warning: while removing linux-image-2.6.22-3-486, directory
> `/lib/modules/2.6.22-3-486' not empty so not removed.
>
> koko:/lib/modules/2.6.22-3-486$ ls -al
> total 12
> drwxr-xr-x 2 root root 4096 2008-08-15 05:33 .
> drwxr-xr-x 7 root root 4096 2008-08-15 05:26 ..
> -rw-r--r-- 1 root root 1303 2007-12-07 22:19 modules.seriomap
> koko:/lib/modules/2.6.22-3-486$
>
> Do these belong to a package, or would I simply rm them?
The package manager is telling you that files that were NOT part of the
package are present in a directory that it should be able to delete.
Either you, or some other package you installed, placed that file there.
I get this warning myself, because I use the proprietary NVidia modules
instead of the Debian packages. (The NVidia installer compiles a kernel
module and places it in /lib/modules, and makes no attempt to use my nice
package management system -- unlike the ATI proprietary drivers, which
creates actual DEBs.)
Since my leftover 'nvidia' module is not track by APT, I _do_ just use
'rm':
# cd /lib/modules
# rm -vrf 2.6.22-3-486
The last command verbosely removes the directory for that kernel's
modules, and any files in it. Only use a command like that if you are
SURE the kernel has been removed (i.e., 'aptitude purge <kernel-version>')
and the directory really is not needed. Any slip of the keyboard, or
PEBKAC attack, and you cannot get back the files you lost!
HTH,
Dave W.
Reply to: