0

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.)

1 Answers1

1

EDIT BELOW

Keep in mind:

  • Ubuntu 21.10 reaches EOL 31Jul2022[0]
  • A non-LTS release should not be running HWE [1]

I assume you have installed (dpkg -l | grep "linux-image*"):

linux-image-5.13.0-52-generic 5.13.0.52.58 amd64 Signed kernel image generic

fallback linux-image-generic

linux-image-generic

Same for headers.

Your image and header files don't match your linux kernel meta package; linux-generic-hwe-20.04 points to linux-image-generic-hwe-20.04 and linux-headers-generic-hwe-20.04 which you don't have(?), because you shouldn't.

Although I'm curious how you got here, your best bet is to backup your home folder and perform some fresh install of another version of Ubuntu (you can only pick LTS until the new non-LTS comes out). Presumably you were going to do this at the end of month anyways.

Further reading around this topic (but not a direct solution to this problem) [2][3][4].

[0] https://endoflife.date/ubuntu

[1] What is hardware enablement (HWE)?

[2] APT wedged by kernel version mismatch

[3] Linux kernel meta package and headers

[4] How do I resolve unmet dependencies after adding a PPA?

EDIT 07/10/2022 based on the question being edited itself:

For an actual guide (I've only skimmed it): Downgrade Kernel Linux

My answer:

why is 21.10 only supported for such a short time anyway? (I thought I was on LTS.)

From Canonical itself [5]:

Every six months between LTS versions, Canonical publishes an interim release of Ubuntu, . . . Interim releases will introduce new capabilities from Canonical and upstream open source projects, they serve as a proving ground for these new capabilities.

Since you have a few kernels already installed you can boot into any of them during boot: How to get to the GRUB menu at boot-time?

Make sure the following package (with its dependencies) is installed:

linux-generic

sudo apt install linux-generic

You can see that the dependencies are the header and image packages (which have more dependencies)

You need to remove all three HWE packages[6] linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04:

Terminal:

sudo apt purge linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04

[5] https://ubuntu.com/about/release-cycle

[6] As a matter of fact, you should make sure you have no hwe package at all.