0

I'm new to Ubuntu system. My server runs on Ubuntu 16.0.4 and kernel is 4.4.0-98-generic as shown by uname -r. I have successfully removed some of kernel images, but I'm experiencing the issue with the linux-image 4.4.0-119. The the output of dpkg -l linux-image* is

$ dpkg -l linux-image*

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-==============================================================================
un  linux-image                         <none>                  <none>       (no description available)
un  linux-image-4.4.0-119-generic        <none>>                <none>       (no description available)
ii  linux-image-4.4.0-97-generic         4.4.0-97.120            amd64                   Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-98-generic         4.4.0-98.121            amd64                   Linux kernel image for version 4.4.0 on 64 bit x86 SMP
pU  linux-image-extra-4.4.0-119-generic  4.4.0-119.143           amd64                   Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-97-generic   4.4.0-97.120            amd64                   Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-98-generic   4.4.0-98.121            amd64                   Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
iU  linux-image-generic                  4.4.0.119.125           amd64                   Generic Linux kernel image

It seems to me that the linux-image-generic points to 4.4.119.125, but the server was booted with 4.4.0-98. This is where I got confused. If I want to remove the image 4.4.0-119, it gave me:

$ sudo dpkg --purge linux-image-extra-4.4.0-119-generic
dpkg: dependency problems prevent removal of linux-image-extra-4.4.0-119-generic:
 linux-image-generic depends on linux-image-extra-4.4.0-119-generic; however:
  Package linux-image-extra-4.4.0-119-generic is to be removed.

dpkg: error processing package linux-image-extra-4.4.0-119-generic (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 linux-image-extra-4.4.0-119-generic

If I run

$ sudo apt-get remove  linux-image-4.4.0-119-generic
[sudo] passwor for ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'linux-image-4.4.0-119-generic' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-image-extra-4.4.0-119-generic : Depends: linux-image-4.4.0-119-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-119-generic but it is not going to be installed
                       Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Adding -f didn't help. My question is, apparently 4.4.0.119 is not installed, but why is it in the output of dpkg -l linux-image* and how can I "remove" it? To make it even worse, I cannot run anything with apt-get. BTW, what does the first column of the above dpkg -l mean, for instance, un, ii, or pU? Any ideas whould be greatly appreciated. Thanks!

  • 1
    Do you really need to remove it? Have you tried sudo apt autoremove?. If you want to go ahead, have a look at this askubuntu.com/questions/2793/… – Katu Apr 13 '18 at 8:25
  • I think you are asking the wrong questions (see XY Problem). Seems like your real problem is that apt won't install anything you wish and you must diagnose the version conflict, not about uninstalling already-removed packages. Since you are new, have many questions, and need help troubleshooting a complex topic, you might find the interactive and mentoring format of ubuntuforums.org more helpful. – user535733 Apr 13 '18 at 12:06
  • @Katu Thx. I tried apt autoremove multiple times; the error is the same: <code>linux-image-extra-4.4.0-119-generic : Depends: linux-image-4.4.0-119-generic but it is not installed</code> I also tried all commands found at the link ../questions/2793 but none of them resolved the conflict. – Collin Apr 13 '18 at 14:11

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.