My Ubuntu instance will do security updates until boot partition is full and from then on kernel updates will fail.
When boot is full it is also not possible to remove older kernels because there are unmet dependencies. Apt will not allow those unmet dependencies to exist. As shown below, I cannot purge 138 because of unmet dependencies but I also cannot install 138 because the disk is full.
I suppose at this point I have edit dependencies manually. Bypassing Apt. How can I fix this issue? Without completely reinstalling Ubuntu?
[user@mysystem:~] $ sudo apt-get purge linux-image-extra-4.4.0-138-generic linux-image-4.4.0-138-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'linux-image-4.4.0-138-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-generic : Depends: linux-image-4.4.0-138-generic but it is not going to be installed
Depends: linux-image-extra-4.4.0-138-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).
I tried the suggestion in Can't clean a full /boot because of unmet dependencies. I used commands like
sudo dpkg --force-all -P linux-image-3.13.0-32-generic
This does free up space. But if I run
sudo apt-get autoremove --purge -f
Those kernels will be downloaded and installed again. Untill boot
is again full. So autoremove
and purge
in the last command is a bit misleading to say the least.
At this point I think the only way to really fix this is to increase boot
partition. It seems small with only given the way that Ubuntu updates kernels. It should be a lot larger default size with ample warnings.
uname -r
)? Which kernel versions are kept in/boot
and which are going to be installed by APT? What’s your/boot
partition size? – Melebius Feb 19 '19 at 08:17