Autoremove entfernt keine alten Header

10

Ich habe eine 16.04-Installation mit einem seltsamen Problem

sudo apt autoremove

Entfernt alte Kernel mit Ausnahme des aktuellen und eines vorherigen, entfernt jedoch keine alten Header.

Bei anderen 16.04-Installationen werden beide entfernt.

Wie kann ich herausfinden, was falsch ist?

Ich habe viel Zeit damit verbracht, die Funktionsweise des Kernel-Autoremove zu lernen, aber keine Unterschiede zwischen funktionierenden und nicht funktionierenden Maschinen festgestellt.

pilot6@Pilot6:~$ cat /etc/apt/apt.conf.d/01autoremove-kernels
// DO NOT EDIT! File autogenerated by /etc/kernel/postinst.d/apt-auto-removal
APT::NeverAutoRemove
{
   "^linux-image-4\.4\.0-38-generic$";
   "^linux-image-4\.4\.0-42-generic$";
   "^linux-image-4\.4\.0-43-generic$";
   "^linux-headers-4\.4\.0-38-generic$";
   "^linux-headers-4\.4\.0-42-generic$";
   "^linux-headers-4\.4\.0-43-generic$";
   "^linux-image-extra-4\.4\.0-38-generic$";
   "^linux-image-extra-4\.4\.0-42-generic$";
   "^linux-image-extra-4\.4\.0-43-generic$";
   "^linux-signed-image-4\.4\.0-38-generic$";
   "^linux-signed-image-4\.4\.0-42-generic$";
   "^linux-signed-image-4\.4\.0-43-generic$";
   "^kfreebsd-image-4\.4\.0-38-generic$";
   "^kfreebsd-image-4\.4\.0-42-generic$";
   "^kfreebsd-image-4\.4\.0-43-generic$";
   "^kfreebsd-headers-4\.4\.0-38-generic$";
   "^kfreebsd-headers-4\.4\.0-42-generic$";
   "^kfreebsd-headers-4\.4\.0-43-generic$";
   "^gnumach-image-4\.4\.0-38-generic$";
   "^gnumach-image-4\.4\.0-42-generic$";
   "^gnumach-image-4\.4\.0-43-generic$";
   "^.*-modules-4\.4\.0-38-generic$";
   "^.*-modules-4\.4\.0-42-generic$";
   "^.*-modules-4\.4\.0-43-generic$";
   "^.*-kernel-4\.4\.0-38-generic$";
   "^.*-kernel-4\.4\.0-42-generic$";
   "^.*-kernel-4\.4\.0-43-generic$";
   "^linux-backports-modules-.*-4\.4\.0-38-generic$";
   "^linux-backports-modules-.*-4\.4\.0-42-generic$";
   "^linux-backports-modules-.*-4\.4\.0-43-generic$";
   "^linux-tools-4\.4\.0-38-generic$";
   "^linux-tools-4\.4\.0-42-generic$";
   "^linux-tools-4\.4\.0-43-generic$";
};
/* Debug information:
# dpkg list:
rc  linux-image-3.11.0-17-generic               3.11.0-17.31                                                amd64        Linux kernel image for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-3.11.0-18-generic               3.11.0-18.32                                                amd64        Linux kernel image for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-3.11.0-19-generic               3.11.0-19.33                                                amd64        Linux kernel image for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-24-generic               3.13.0-24.47                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-27-generic               3.13.0-27.50                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-29-generic               3.13.0-29.53                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-30-generic               3.13.0-30.55                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-32-generic               3.13.0-32.57                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-33-generic               3.13.0-33.58                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-34-generic               3.13.0-34.60                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-35-generic               3.13.0-35.62                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-36-generic               3.13.0-36.63                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.13.0-39-generic               3.13.0-39.66                                                amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-25-generic               3.16.0-25.33~14.04.2                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-28-generic               3.16.0-28.38~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-29-generic               3.16.0-29.39~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-30-generic               3.16.0-30.40~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-33-generic               3.16.0-33.44~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-34-generic               3.16.0-34.47~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-36-generic               3.16.0-36.48~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-37-generic               3.16.0-37.51~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-38-generic               3.16.0-38.52~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-39-generic               3.16.0-39.53~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.16.0-40-generic               3.16.0-40.54~14.04.1                                        amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-21-generic               3.19.0-21.21~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-22-generic               3.19.0-22.22~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-23-generic               3.19.0-23.24~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-25-generic               3.19.0-25.26~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-26-generic               3.19.0-26.28~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-28-generic               3.19.0-28.30~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-30-generic               3.19.0-30.34~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-31-generic               3.19.0-31.36~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-32-generic               3.19.0-32.37~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-3.19.0-33-generic               3.19.0-33.38~14.04.1                                        amd64        Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-18-generic                4.2.0-18.22~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-19-generic                4.2.0-19.23~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-21-generic                4.2.0-21.25~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-22-generic                4.2.0-22.27~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-23-generic                4.2.0-23.28~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-25-generic                4.2.0-25.30~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-27-generic                4.2.0-27.32~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-30-generic                4.2.0-30.36~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-32-generic                4.2.0-32.37~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.2.0-34-generic                4.2.0-34.39~14.04.1                                         amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-10-generic                4.4.0-10.25                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-11-generic                4.4.0-11.26                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-12-generic                4.4.0-12.28                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-13-generic                4.4.0-13.29~14.04.1                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-14-generic                4.4.0-14.30~14.04.2                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-15-generic                4.4.0-15.31~14.04.1                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-18-generic                4.4.0-18.34~14.04.1                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-21-generic                4.4.0-21.37                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-22-generic                4.4.0-22.40                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-24-generic                4.4.0-24.43                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-28-generic                4.4.0-28.47                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-31-generic                4.4.0-31.50                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-34-generic                4.4.0-34.53                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-36-generic                4.4.0-36.55                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-38-generic                4.4.0-38.57                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-42-generic                4.4.0-42.62                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-43-generic                4.4.0-43.63                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-3.11.0-17-generic         3.11.0-17.31                                                amd64        Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-extra-3.11.0-18-generic         3.11.0-18.32                                                amd64        Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-extra-3.11.0-19-generic         3.11.0-19.33                                                amd64        Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-24-generic         3.13.0-24.47                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-27-generic         3.13.0-27.50                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-29-generic         3.13.0-29.53                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-30-generic         3.13.0-30.55                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-32-generic         3.13.0-32.57                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-33-generic         3.13.0-33.58                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-34-generic         3.13.0-34.60                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-35-generic         3.13.0-35.62                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-36-generic         3.13.0-36.63                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-39-generic         3.13.0-39.66                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-40-generic         3.13.0-40.69                                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-25-generic         3.16.0-25.33~14.04.2                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-28-generic         3.16.0-28.38~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-29-generic         3.16.0-29.39~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-30-generic         3.16.0-30.40~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-33-generic         3.16.0-33.44~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-34-generic         3.16.0-34.47~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-36-generic         3.16.0-36.48~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-37-generic         3.16.0-37.51~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-38-generic         3.16.0-38.52~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-39-generic         3.16.0-39.53~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.16.0-40-generic         3.16.0-40.54~14.04.1                                        amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-21-generic         3.19.0-21.21~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-22-generic         3.19.0-22.22~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-23-generic         3.19.0-23.24~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-25-generic         3.19.0-25.26~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-26-generic         3.19.0-26.28~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-28-generic         3.19.0-28.30~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-30-generic         3.19.0-30.34~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-31-generic         3.19.0-31.36~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-32-generic         3.19.0-32.37~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-3.19.0-33-generic         3.19.0-33.38~14.04.1                                        amd64        Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-18-generic          4.2.0-18.22~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-19-generic          4.2.0-19.23~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-21-generic          4.2.0-21.25~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-22-generic          4.2.0-22.27~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-23-generic          4.2.0-23.28~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-25-generic          4.2.0-25.30~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-27-generic          4.2.0-27.32~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-30-generic          4.2.0-30.36~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-32-generic          4.2.0-32.37~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.2.0-34-generic          4.2.0-34.39~14.04.1                                         amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-10-generic          4.4.0-10.25                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-11-generic          4.4.0-11.26                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-12-generic          4.4.0-12.28                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-13-generic          4.4.0-13.29~14.04.1                                         amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-14-generic          4.4.0-14.30~14.04.2                                         amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-15-generic          4.4.0-15.31~14.04.1                                         amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-18-generic          4.4.0-18.34~14.04.1                                         amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-21-generic          4.4.0-21.37                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-22-generic          4.4.0-22.40                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-24-generic          4.4.0-24.43                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-28-generic          4.4.0-28.47                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-31-generic          4.4.0-31.50                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-34-generic          4.4.0-34.53                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-36-generic          4.4.0-36.55                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rH  linux-image-extra-4.4.0-38-generic          4.4.0-38.57                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-42-generic          4.4.0-42.62                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-43-generic          4.4.0-43.63                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-generic                         4.4.0.43.45                                                 amd64        Generic Linux kernel image
# list of installed kernel packages:
4.4.0-38-generic 4.4.0-38.57
4.4.0-42-generic 4.4.0-42.62
4.4.0-43-generic 4.4.0-43.63
# list of different kernel versions:
4.4.0-43.63
4.4.0-42.62
4.4.0-38.57
# Installing kernel: 4.4.0-38.57 (4.4.0-38-generic)
# Running kernel: 4.4.0-43.63 (4.4.0-43-generic)
# Last kernel: 4.4.0-43.63
# Previous kernel: 4.4.0-42.62
# Kernel versions list to keep:
4.4.0-38.57
4.4.0-42.62
4.4.0-43.63
# Kernel packages (version part) to protect:
4\.4\.0-38-generic
4\.4\.0-42-generic
4\.4\.0-43-generic
*/

pilot6@Pilot6:~$ aptitude search '^linux* ?installed'
i A linux-base                      - Linux image base package                  
i   linux-firmware                  - Firmware for Linux kernel drivers         
i   linux-generic                   - Complete Generic Linux kernel and headers 
i A linux-headers-4.4.0-34          - Header files related to Linux kernel versi
i A linux-headers-4.4.0-34-generic  - Linux kernel headers for version 4.4.0 on 
i A linux-headers-4.4.0-36          - Header files related to Linux kernel versi
i A linux-headers-4.4.0-36-generic  - Linux kernel headers for version 4.4.0 on 
i A linux-headers-4.4.0-38          - Header files related to Linux kernel versi
i A linux-headers-4.4.0-38-generic  - Linux kernel headers for version 4.4.0 on 
i A linux-headers-4.4.0-42          - Header files related to Linux kernel versi
i A linux-headers-4.4.0-42-generic  - Linux kernel headers for version 4.4.0 on 
i A linux-headers-4.4.0-43          - Header files related to Linux kernel versi
i A linux-headers-4.4.0-43-generic  - Linux kernel headers for version 4.4.0 on 
i A linux-headers-generic           - Generic Linux kernel headers              
i A linux-image-4.4.0-42-generic    - Linux kernel image for version 4.4.0 on 64
i A linux-image-4.4.0-43-generic    - Linux kernel image for version 4.4.0 on 64
i A linux-image-extra-4.4.0-42-gene - Linux kernel extra modules for version 4.4
i A linux-image-extra-4.4.0-43-gene - Linux kernel extra modules for version 4.4
i A linux-image-generic             - Generic Linux kernel image                
i   linux-libc-dev                  - Linux Kernel Headers for development      
i   linux-sound-base                - base package for ALSA and OSS sound system

pilot6@Pilot6:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Nach dem vorherigen Durchlauf wurden apt autoremovealle linux-imagePakete außer 4.4.0-42 und 43 entfernt, aber die Header bleiben erhalten.

Dies ist die debug-autoremove.txt aus der betroffenen Installation.

https://dl.dropboxusercontent.com/u/89297281/debug-autoremove.txt

Dies ist die Ausgabe desselben Befehls von einem nicht betroffenen Computer.

https://dl.dropboxusercontent.com/u/89297281/debug-autoremove-good.txt

Hier ist der erste mit Sudo.

http://paste.ubuntu.com/23343952/

Pilot6
quelle
+1 Würde mich auch für Antworten interessieren, für mich wird nur das Linux-Extra-Paket entfernt und nicht einmal das Haupt-Image ... Im Moment habe ich nur darauf zurückgegriffen, sie manuell zu entfernen, da es nur zwei Pakete sind.
Fkraiem
Hast du einen Testfall? Wenn ja, können Sie den Inhalt /etc/apt/apt.conf.d/01autoremove-kernelsund die Ausgabe von veröffentlichen aptitude search '^linux* ?installed'. Nur um zu bestätigen, dass alle Kernel automatisch installiert werden.
user.dz
@ user.dz Ich habe die Informationen hinzugefügt.
Pilot6
@ Pilot6, Könnten Sie Debuggen von beiden Computern (ohne / ohne Problem) mit generieren apt-get -o Debug::pkgAutoRemove=1 -s autoremove 2> debug-autoremove.txt(keine Notwendigkeit sudo, es ist eine Simulation -s). Ich habe einen Testfall für alte Header, aber ich habe nicht mehrere Installationen zum Vergleichen. Ich gehe davon aus, dass es sich um ein Abhängigkeitsproblem mit dem virtuellen Paket handelt (in meinem Fall mit virtualbox 5), mit Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-36-generic:amd64 4.4.0-36.55dem ich nur einen Vergleich feststellen kann linux-image.
user.dz
@ user.dz Ich habe die Debug-Informationen von beiden Computern hinzugefügt.
Pilot6

Antworten:

3

autoremove entfernt jedes Paket, das:

  • wird automatisch installiert
  • ist in der APT::NeverAutoRemoveAPT-Konfiguration nicht enthalten
  • habe keine abhängigen

Hier sind die Debugging-Schritte, die wir befolgt haben

  1. Automatische / manuelle Installation überprüft

    aptitude search '^linux* ?installed'
    
  2. Überprüft aktuell deklarierte Versionen unter APT::NeverAutoRemove

    cat /etc/apt/apt.conf.d/01autoremove-kernels
    
  3. Überprüfte Abhängigkeit

    apt-cache rdepends linux-headers-4.4.0-38-generic
    

    bringt nichts als

    sudo apt-get -o Debug::pkgAutoRemove=1 -s autoremove 2> debug-autoremove.txt
    
    ...
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-43-lowlatency:amd64 4.4.0-43.63
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-43-generic:amd64 4.4.0-43.63
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-42-lowlatency:amd64 4.4.0-42.62
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-42-generic:amd64 4.4.0-42.62
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-38-lowlatency:amd64 4.4.0-38.57
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-38-generic:amd64 4.4.0-38.57
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-36-lowlatency:amd64 4.4.0-36.55
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-36-generic:amd64 4.4.0-36.55
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-34-lowlatency:amd64 4.4.0-34.53
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-34-generic:amd64 4.4.0-34.53
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-31-lowlatency:amd64 4.4.0-31.50
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-31-generic:amd64 4.4.0-31.50
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-28-lowlatency:amd64 4.4.0-28.47
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-28-generic:amd64 4.4.0-28.47
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-24-lowlatency:amd64 4.4.0-24.43
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-24-generic:amd64 4.4.0-24.43
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-22-lowlatency:amd64 4.4.0-22.40
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-22-generic:amd64 4.4.0-22.40
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-21-lowlatency:amd64 4.4.0-21.37
    Following dep: virtualbox-5.0:amd64 5.0.20-106931~Ubuntu~wily Recommends linux-headers:amd64 , provided by linux-headers-4.4.0-21-generic:amd64 4.4.0-21.37
    ...
    

    Es handelt sich also um ein Abhängigkeitsproblem über das virtuelle Paket linux-headers

Ich bin hier im Zweifel, es scheint mir als Fehler.

  • Entweder in der Autoremove-Funktion kann es nicht mit der Abhängigkeit von virtuellen Paketen umgehen.
  • Oder im Virtualbox-Paket ist möglicherweise eine andere Möglichkeit erforderlich, die Abhängigkeit von Linux-Headern zu deklarieren.
user.dz
quelle
1

Ich vertraue im Allgemeinen nicht sehr darauf, Systemwartungsaktionen automatisch auszuführen, wenn es um wichtige Themen wie die Kernelverwaltung geht. Wie ich Ihren Kommentaren entnehmen kann, scheint es eine Störung von VirtualBox 5 zu geben. Daher empfehle ich den zuverlässigsten Weg, um alte Kernel zu bereinigen.

Überprüfen Sie, welche Kernelversionen installiert sind: dpkg --get-selections | grep linux

So suchen Sie speziell nach Headern: dpkg --get-selections | grep linux-headers

Entfernen Sie diejenigen, die Sie entfernen möchten (ersetzen Sie * durch die Versionsnummer des Kernels):

sudo apt purge linux-headers-* linux-headers-*-generic linux-image-*-generic linux-image-extra-*-generic linux-signed-image-*-generic

Dies ist natürlich keine Erklärung dafür, was schief gelaufen ist und warum das automatische Entfernen von Headern beim Ausführen des apt autoremoveBefehls nicht funktioniert. Letztendlich ist es jedoch eine Lösung, um das zu erreichen, was Sie möchten, und es stellt außerdem sicher, dass alles ordnungsgemäß bereinigt wird.

cl-netbox
quelle
Das mache ich jetzt ;-) Die Frage ist, was das Problem war und wie man es behebt.
Pilot6
@ Pilot6: Sie sagten, dass VirtualBox die Hauptursache ist. Wenn sie es also in einer der nächsten Versionen nicht beheben können, können Sie in Betracht ziehen, zu KVM (qemu / virt-manager) zu wechseln. Das habe ich vor einiger Zeit gemacht ... seitdem kein einziges Problem und die Leistung ist großartig! :)
Cl-Netbox