3

The command I am running is:

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

However, during the command,apt-get wants to install packages of version 3.16.0-50. Here is the output:

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

Would anyone know why apt-get is installing the newer version of linux kernel 3.16.0-50 when I am trying to remove 3.16.0-30? Is there any way to prevent this?

System info

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

apt-rdepends output

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  

List of all linux kernel packages

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 show 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 show 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 show linux-headers-generic-lts-utopic

Depends: linux-headers-3.16.0-30-generic

apt-get in debug mode:

...
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  
...
Minh La
  • 41
  • 4
  • This is probably because you have the generic linux 3.6 packages installed. Please post the output of the following (in the question, not in a comment) dpkg -l | grep linux-image and also dpkg -l | grep linux-headers. By generic I mean something like linux-image-amd64. This needs to depend on something, so my guess is that it is pulling a different version of 3.16. Also post the output of apt-cache policy. And what is your distribution and version? – Faheem Mitha Oct 14 '15 at 00:13
  • Distribution: Ubuntu 14.04.3 LTS,

    Current kernel: 3.19.0-30-generic

    – Minh La Oct 14 '15 at 00:45
  • Ok, also, please paste text rather than images. It's easier for a number of reasons, including page size, ability to cut and paste, and ability to search. Also put other information like distribution into the question too. Also, please state what you are trying to do. Are you trying to remove all 3.16 packages from your system, leaving only 3.19 packages? If so, the simplest thing would be to remove all linux related packages with version 3.16 from your system. Make sure you are running 3.19 first, of course. – Faheem Mitha Oct 14 '15 at 00:56
  • yes, I want to only keep 3.19 packages and remove all of 3.16 packages. I can remove of 3.16 packages if I try to remove 3.16.0-30, then 3.16.0-50 with the command in the original question. However, I want to understand the behavior of why linux wants to install 3.16.0-50 when I'm trying to remove 3.16.0-30. – Minh La Oct 14 '15 at 01:14
  • Please rerun your apt-get command with the addition of -o Debug::pkgProblemResolver=true, paste into your question, and please don't use an image. And get rid of the images you have, please. Thanks. – Faheem Mitha Oct 14 '15 at 01:19
  • Also include the output of apt-cache show linux-generic-lts-utopic in the question, but the Depends: line only. – Faheem Mitha Oct 14 '15 at 05:50
  • I added the output to the question as well as an answer to the question. Thanks for your help! – Minh La Oct 14 '15 at 16:51
  • If you have an answer, post it as an answer (you can answer your own question), not as part of the question. Also, please post the complete output of apt-get purge in debug mode. The two lines you posted are presumably not all of it. Also, can you post the output for apt-cache show linux-image-generic-lts-utopic and apt-cache show linux-headers-generic-lts-utopic? Again, just the Depends line. – Faheem Mitha Oct 14 '15 at 21:17

1 Answers1

1

The linux-generic-lts-utopic depends on 3.16.0-30. If 3.16.0-30 is removed, apt-get will install 3.16.0-50 as a dependency to replace 3.16.0-30. Thus, removing linux-generic-lts-utopic first will remove any dependency and will allow a clean purging of all 3.16.

Minh La
  • 41
  • 4