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!
sudo apt autoremove
?. If you want to go ahead, have a look at this https://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu – Katu Apr 13 '18 at 08:25linux-image-extra-4.4.0-119-generic : Depends: linux-image-4.4.0-119-generic but it is not installed
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