删除/清除 linux-headers-3.16.0-30-generic,但 apt-get 想要安装 linux-headers-3.16.0-50-generic

删除/清除 linux-headers-3.16.0-30-generic,但 apt-get 想要安装 linux-headers-3.16.0-50-generic

我正在运行的命令是:

apt-get purge linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic linux-libc-dev --assume-yes

但是,在命令期间,apt-get想要安装 version 的软件包3.16.0-50。这是输出:

The following extra packages will be installed:
  linux-generic-lts-utopic linux-headers-3.16.0-50
  linux-headers-3.16.0-50-generic linux-headers-generic-lts-utopic
  linux-image-3.16.0-50-generic linux-image-extra-3.16.0-50-generic
  linux-image-generic-lts-utopic

Suggested packages:
  fdutils linux-lts-utopic-tools

The following packages will be REMOVED:
  build-essential g++ g++-4.8 glusterfs-client glusterfs-common
  glusterfs-server libacl1-dev libattr1-dev libc6-dev libstdc++-4.8-dev
  linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
  linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
  linux-libc-dev

有人知道为什么当我尝试删除时apt-get要安装较新版本的 Linux 内核吗?有什么办法可以防止这种情况发生吗?3.16.0-503.16.0-30

系统信息

Distribution: Ubuntu 14.04.3 LTS  
Current kernel: 3.19.0-30-generic  

apt-rdepends 输出

apt-rdepends -r --state-follow=Installed linux-headers-3.16.0-30 

linux-headers-3.16.0-30  
  Reverse Depends: linux-headers-3.16.0-30-generic (3.16.0-30.40~14.04.1)  
  Reverse Depends: linux-headers-3.16.0-30-lowlatency (3.16.0-30.40~14.04.1)  
linux-headers-3.16.0-30-generic  
  Reverse Depends: linux-headers-generic-lts-utopic (3.16.0.30.23)  
linux-headers-generic-lts-utopic  
  Reverse Depends: linux-generic-lts-utopic (= 3.16.0.50.41)  
  Reverse Depends: linux-headers-virtual-lts-utopic (= 3.16.0.50.41)  
  Reverse Depends: linux-hwe-generic-trusty (3.13.0.65.71)  
  Reverse Depends: linux-signed-generic-lts-utopic (= 3.16.0.50.41)  
linux-generic-lts-utopic  

所有linux内核包的列表

ii  linux-firmware                      1.127.15  
ii  linux-generic-lts-utopic            3.16.0.30.23  
ii  linux-generic-lts-vivid             3.19.0.30.17  
ii  linux-headers-3.16.0-30             3.16.0-30.40~14.04.1  
ii  linux-headers-3.16.0-30-generic     3.16.0-30.40~14.04.1  
ii  linux-headers-3.19.0-30             3.19.0-30.33~14.04.1  
ii  linux-headers-3.19.0-30-generic     3.19.0-30.33~14.04.1  
ii  linux-headers-generic-lts-utopic    3.16.0.30.23  
ii  linux-headers-generic-lts-vivid     3.19.0.30.17  
ii  linux-image-3.16.0-30-generic       3.16.0-30.40~14.04.1   
ii  linux-image-3.19.0-30-generic       3.19.0-30.33~14.04.1   
ii  linux-image-extra-3.16.0-30-generic 3.16.0-30.40~14.04.1   
ii  linux-image-extra-3.19.0-30-generic 3.19.0-30.33~14.04.1  
ii  linux-image-generic-lts-utopic      3.16.0.30.23  
ii  linux-image-generic-lts-vivid       3.19.0.30.17  
ii  linux-libc-dev:amd64                3.13.0-65.105 

apt-cache 显示 linux-generic-lts-utopic

Depends: linux-image-generic-lts-utopic (= 3.16.0.30.23), linux-headers-generic-lts-utopic (= 3.16.0.30.23)  

apt-cache 显示 linux-image-generic-lts-utopic

Depends: linux-image-3.16.0-30-generic, linux-image-extra-3.16.0-30-generic, linux-firmware

apt-cache 显示 linux-headers-generic-lts-utopic

Depends: linux-headers-3.16.0-30-generic

apt-get 处于调试模式:

...
Broken linux-image-generic-lts-utopic:amd64 Depends on linux-image-3.16.0-50-generic  
Broken linux-headers-generic-lts-utopic:amd64 Depends on linux-headers-3.16.0-50-generic  
...

答案1

linux-generic-lts-utopic 依赖于 3.16.0-30。如果删除 3.16.0-30,apt-get 将安装 3.16.0-50 作为依赖项来替换 3.16.0-30。因此,首先删除 linux-generic-lts-utopic 将删除所有依赖项,并允许彻底清除所有 3.16。

相关内容