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

issue with purging an old kernel



Normally to remove an old kernel from my debian stable systems, I issue the following command:

----

apt purge linux-headers-<kernel-number>-amd64 linux-headers-<kernel-number>-common linux-image-<kernel-number>-amd64

----

Following this recipe, which has always worked in the past, I issued:

----

apt purge linux-headers-5.10.0-11-amd64 linux-headers-5.10.0-11-common linux-image-5.10.0-11-amd64

----

But it failed, with the error message:

----

Purging configuration files for linux-image-5.10.0-11-amd64 (5.10.92-2) ...
rmdir: failed to remove '/lib/modules/5.10.0-11-amd64': Directory not empty
dpkg: warning: while removing linux-image-5.10.0-11-amd64, directory '/lib/modules/5.10.0-11-amd64' not empty so not removed

----

If I look in the named directory, I see:

----

root@zbrew:~# ls -al /lib/modules/5.10.0-11-amd64
total 35
drwxr-xr-x 3 root root 3 Jun 20 08:49 .
drwxr-xr-x 7 root root 7 Jun 17 07:08 ..
drwxr-xr-x 2 root root 2 Apr 25 07:53 misc

----

and the directory /lib/modules/5.10.0-11-amd64/misc turns out to be empty.

So it seems reasonable to remove /lib/modules/5.10.0-11-amd64/misc/ manually and re-execute the purge command.

But before I try that, I'm puzzled as to how this situation could have arisen. Has anyone else seen this happen, and does anyone have a reasonable suggestion as to how it could have occurred?

  Doc

--
Web:  http://enginehousebooks.com/drevans


Reply to: