Score:0

Ubuntu won't update: "The package linux-modules-5.19.0-32-generic needs to be reinstalled", but I can't find an archive for it

mx flag

Every time I try to upgrade packages with sudo apt upgrade I get this error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package linux-modules-5.19.0-32-generic needs to be reinstalled, but I can't find an archive for it.

Gnome-software won't run. If I try I get a red circle with a white line across it in the system tray with an error message: screengrab of error message

I've been trying to fix it by following instructions in this post: I am having a problem with the package manager on 18.04 LTS. Obviously this is for a different version of Ubuntu to the one I am struggling with, but the problem appears to be the same.

I've downloaded the closest .deb package that matches the missing package from https://ubuntu.pkgs.org/22.04/ubuntu-updates-main-amd64/linux-modules-5.19.0-41-generic_5.19.0-41.42~22.04.1_amd64.deb.html.

That was the closest I could get but trying to install it locally with sudo apt install just throws the same error message above.

This information might be useful. Output of ls -la /etc/apt/sources.list:

-rw-r--r-- 1 root root 838 May 20 15:15 /etc/apt/sources.list

Output of uname -a:

Linux slug 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of cat /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner

Output of sudo dpkg-reconfigure -a:

Unknown option: a

In the comments Marco suggested a corrected form of this code as

dpkg --configure -a

That produces no output at all. Just another line in the terminal with ~$.

Output of dpkg -l | egrep linux-'[g|i|h|m]' as requested by nobody:

ii  linux-generic-hwe-22.04                    5.15.0.60.58                            amd64        Complete Generic Linux kernel and headers
ii  linux-headers-5.15.0-58                    5.15.0-58.64                            all          Header files related to Linux kernel version 5.15.0
ii  linux-headers-5.15.0-58-generic            5.15.0-58.64                            amd64        Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
ii  linux-headers-5.15.0-60                    5.15.0-60.66                            all          Header files related to Linux kernel version 5.15.0
ii  linux-headers-5.15.0-60-generic            5.15.0-60.66                            amd64        Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
ii  linux-headers-generic-hwe-22.04            5.15.0.60.58                            amd64        Generic Linux kernel headers
rc  linux-image-5.15.0-43-generic              5.15.0-43.46                            amd64        Signed kernel image generic
rc  linux-image-5.15.0-56-generic              5.15.0-56.62                            amd64        Signed kernel image generic
rc  linux-image-5.15.0-57-generic              5.15.0-57.63                            amd64        Signed kernel image generic
ii  linux-image-5.15.0-58-generic              5.15.0-58.64                            amd64        Signed kernel image generic
ii  linux-image-5.15.0-60-generic              5.15.0-60.66                            amd64        Signed kernel image generic
ii  linux-image-generic-hwe-22.04              5.15.0.60.58                            amd64        Generic Linux kernel image
rc  linux-modules-5.15.0-43-generic            5.15.0-43.46                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-5.15.0-56-generic            5.15.0-56.62                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-5.15.0-57-generic            5.15.0-57.63                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii  linux-modules-5.15.0-58-generic            5.15.0-58.64                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii  linux-modules-5.15.0-60-generic            5.15.0-60.66                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
iHR linux-modules-5.19.0-32-generic            5.19.0-32.33~22.04.1                    amd64        (no description available)
rc  linux-modules-extra-5.15.0-43-generic      5.15.0-43.46                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.15.0-56-generic      5.15.0-56.62                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.15.0-57-generic      5.15.0-57.63                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.15.0-58-generic      5.15.0-58.64                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.15.0-60-generic      5.15.0-60.66                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
Marco avatar
br flag
The command is `dpkg --configure -a` or `apt-get -f install`. not the one you mentioned.
Marco avatar
br flag
besides this, the problem you describe is not clear. Which error do you get from which command?
nobody avatar
gh flag
Please add `dpkg -l | egrep linux-'[g|i|h|m]'`to your question through [edit] We can remove the packages from your system that requires it.
Ninja Chris avatar
mx flag
Thanks for all the replies. @guiverc, sorry I don't know how the 18.04 tag got there. I've removed it as my problem is with 22.04.
Ninja Chris avatar
mx flag
Thanks again, more info and output added. NC
Score:1
gh flag

Note this is bruteforce the package is not longer available.

sudo dpkg -P --force-remove-reinstreq linux-modules-5.19.0-32-generic

This way it could be that some parts of the package can remain on your system.

More force

sudo dpkg -P --force-all linux-modules-5.19.0-32-generic

To avoid such problems a configured apt not to remove downloaded packages

cat /etc/apt/apt.conf.d/01keep-debs 
# Heruntergeladene Pakete behalten.
Binary::apt::APT::Keep-Downloaded-Packages "true";
APT::Get::Keep-Downloaded-Packages "true";
Binary::apt-get::APT::Keep-Downloaded-Packages "true";

So i can use my local cache under /var/cache/apt/archives/

Ninja Chris avatar
mx flag
Awesome! Thank you for the solution. I ran both lines. Only the 1st was necessary, I think. Now upgrading.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.