A couple of days ago I found that my Ubuntu 21.10 could no longer perform updates, and at the same time found that the "Ubuntu Software" app finding utility could no longer find any apps at all available. When trying to update the system, I got this error report:
The package system is broken
Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
The following packages have unmet dependencies:
linux-generic-hwe-20.04: Depends: linux-image-generic-hwe-20.04 (= 5.13.0.44.53) but 5.13.0.52.58 is installed
Depends: linux-headers-generic-hwe-20.04 (= 5.13.0.44.53) but 5.13.0.52.58 is installed
Since then, I've searched around and tried various commands that appear to clean, fix, update dependencies, etc. of apt and dpkg (including the one recommended in the error), all of them running through several results successfully but also and including some error that looks about the same as the one above I think, with a kernel version dependency mismatch. I'm not sure how my kernel version appears to have gotten ahead of its dependants; I don't typically mess with the guts of my system and I'm not sure I could have caused this.
One oddity about my system that I will note is that this partition's filesystem is btrfs. It was a mostly successful experiment, except for the fact that when I run over RAM into swap, it never moves stuff back, so my system is always hopelessly bogged down until I restart, even after closing several programs. I think that this is unrelated, though.
Results of: dpkg -l | grep "linux-image*"
rc linux-image-5.11.0-31-generic 5.11.0-31.33 amd64 Signed kernel image generic
rc linux-image-5.11.0-34-generic 5.11.0-34.36 amd64 Signed kernel image generic
rc linux-image-5.11.0-36-generic 5.11.0-36.40 amd64 Signed kernel image generic
rc linux-image-5.11.0-37-generic 5.11.0-37.41 amd64 Signed kernel image generic
rc linux-image-5.11.0-38-generic 5.11.0-38.42 amd64 Signed kernel image generic
rc linux-image-5.11.0-40-generic 5.11.0-40.44 amd64 Signed kernel image generic
rc linux-image-5.11.0-41-generic 5.11.0-41.45 amd64 Signed kernel image generic
rc linux-image-5.11.0-44-generic 5.11.0-44.48 amd64 Signed kernel image generic
rc linux-image-5.11.0-49-generic 5.11.0-49.55 amd64 Signed kernel image generic
rc linux-image-5.13.0-37-generic 5.13.0-37.42 amd64 Signed kernel image generic
rc linux-image-5.13.0-39-generic 5.13.0-39.44 amd64 Signed kernel image generic
ii linux-image-5.13.0-40-generic 5.13.0-40.45 amd64 Signed kernel image generic
ii linux-image-5.13.0-41-generic 5.13.0-41.46 amd64 Signed kernel image generic
ii linux-image-5.13.0-44-generic 5.13.0-44.49 amd64 Signed kernel image generic
ii linux-image-5.13.0-48-generic 5.13.0-48.54 amd64 Signed kernel image generic
ii linux-image-5.13.0-52-generic 5.13.0-52.59 amd64 Signed kernel image generic
rc linux-image-5.8.0-25-generic 5.8.0-25.26 amd64 Signed kernel image generic
rc linux-image-5.8.0-29-generic 5.8.0-29.31 amd64 Signed kernel image generic
rc linux-image-5.8.0-31-generic 5.8.0-31.33 amd64 Signed kernel image generic
rc linux-image-5.8.0-33-generic 5.8.0-33.36 amd64 Signed kernel image generic
rc linux-image-5.8.0-34-generic 5.8.0-34.37 amd64 Signed kernel image generic
rc linux-image-5.8.0-36-generic 5.8.0-36.40 amd64 Signed kernel image generic
rc linux-image-5.8.0-38-generic 5.8.0-38.43 amd64 Signed kernel image generic
rc linux-image-5.8.0-41-generic 5.8.0-41.46 amd64 Signed kernel image generic
rc linux-image-5.8.0-43-generic 5.8.0-43.49 amd64 Signed kernel image generic
rc linux-image-5.8.0-44-generic 5.8.0-44.50 amd64 Signed kernel image generic
rc linux-image-5.8.0-45-generic 5.8.0-45.51 amd64 Signed kernel image generic
rc linux-image-5.8.0-48-generic 5.8.0-48.54 amd64 Signed kernel image generic
rc linux-image-5.8.0-49-generic 5.8.0-49.55 amd64 Signed kernel image generic
rc linux-image-5.8.0-50-generic 5.8.0-50.56 amd64 Signed kernel image generic
rc linux-image-5.8.0-53-generic 5.8.0-53.60 amd64 Signed kernel image generic
rc linux-image-5.8.0-55-generic 5.8.0-55.62 amd64 Signed kernel image generic
rc linux-image-5.8.0-59-generic 5.8.0-59.66 amd64 Signed kernel image generic
rc linux-image-5.8.0-63-generic 5.8.0-63.71 amd64 Signed kernel image generic
ii linux-image-generic 5.13.0.41.50 amd64 Generic Linux kernel image
ii linux-image-generic-hwe-20.04 5.13.0.52.58 amd64 Generic Linux kernel image
Edit based on people's suggestions: I don't know enough to be certain, but I don't think switching to archived release servers would help, since the problem is that I'm apparently using an HWE kernel somehow, and APT didn't like that. Is there a way to roll back my kernel version that would work in this case? Can I simply remove the too-new HWE kernel version (and how do I do that), or will it just break itself again because it's somehow set to use HWE kernels? Should I somehow force it to switch to a different update server, would that work, despite that this is a different problem than the one others suggested I look at?
Certainly I could reinstall my whole system, but if the solution is simple enough (and yes I do want to update it, I just fell behind in letting it because my internet is slow enough that I prefer to pick and choose when to update) then I'd rather not have to. And why is 21.10 only supported for such a short time anyway? (I thought I was on LTS.)
linux-generic-hwe-20.04
kernel package installed. HWE kernels are for LTS releases only, and HWE kernel metapackages are not in the 21.10 repositories. So that output suggests more to the story than so far revealed. – user535733 Jul 09 '22 at 05:16