我有一个奇怪的问题的 16.04 安装
sudo apt autoremove
删除除当前和以前的旧内核,但不删除旧标头。
在其他 16.04 安装中,它会同时删除两者。
我怎样才能找出问题所在?
我花了很多时间学习内核自动删除的工作原理,但没有发现工作机器和非工作机器之间有任何区别。
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.
在上一次运行后,除 4.4.0-42 和 43 之外的apt autoremove
所有linux-image
包都已删除,但标题仍保留。
这是受影响安装中的 debug-autoremove.txt。
https://dl.dropboxusercontent.com/u/89297281/debug-autoremove.txt
这是来自未受影响机器的同一命令的输出。
https://dl.dropboxusercontent.com/u/89297281/debug-autoremove-good.txt
这是第一个使用 sudo 的。
autoremove
将删除以下任何软件包:APT::NeverAutoRemove
APT 配置中这是我们遵循的调试步骤
检查自动/手动安装
检查当前声明的版本
APT::NeverAutoRemove
检查依赖项
只带来
所以这是通过虚拟包的依赖问题
linux-headers
我在这里有疑问,在我看来它是错误的。
当涉及到内核管理等重要主题时,我通常不太相信自动运行系统维护操作。从您的评论中我可以看出,VirtualBox 5 似乎存在干扰。所以我推荐最可靠的方法来清理旧内核。
检查安装了哪些内核版本:
dpkg --get-selections | grep linux
要特别检查标题:
dpkg --get-selections | grep linux-headers
删除您要删除的那些(将 * 替换为内核版本号):
这当然不是解释出了什么问题以及为什么在运行命令时自动删除标头不起作用
apt autoremove
,但最终它是实现您想要的解决方案并且它还确保所有内容都被正确清理。