E:The package linux-modules-5.14.7-051407-generic needs to be reinstalled, but I can't find an archive for it

hi, I am receiving this error whenever I try to update my system
I did try opening synaptic package manger but got this result

This is no-standard Ubuntu package.

Please add the following output to next reply:

dpkg -l | grep 5.14.7-051407-generic
apt-cache policy '*5.14.7-051407-generic*'
1 Like

this is what I got as output

Share output of

in text please.

linux-modules-5.14.7-051407-generic:
  Installed: 5.14.7-051407.202109221210
  Candidate: 5.14.7-051407.202109221210
  Version table:
 *** 5.14.7-051407.202109221210 100
        100 /var/lib/dpkg/status
linux-image-unsigned-5.14.7-051407-generic:
  Installed: 5.14.7-051407.202109221210
  Candidate: 5.14.7-051407.202109221210
  Version table:
 *** 5.14.7-051407.202109221210 100
        100 /var/lib/dpkg/status
linux-modules-extra-5.14.7-051407-generic:
  Installed: (none)
  Candidate: (none)
  Version table:
linux-headers-5.14.7-051407-generic:
  Installed: 5.14.7-051407.202109221210
  Candidate: 5.14.7-051407.202109221210
  Version table:
 *** 5.14.7-051407.202109221210 100
        100 /var/lib/dpkg/status
linux-image-5.14.7-051407-generic:
  Installed: (none)
  Candidate: (none)
  Version table:

So these kernel packages are installed locally. APT can't find actual repository for them.
You can remove them by using commands below:

sudo apt-get purge linux-modules-5.14.7-051407-generic
sudo apt-get purge linux-image-unsigned-5.14.7-051407-generic
sudo apt-get purge linux-modules-extra-5.14.7-051407-generic
sudo apt-get purge linux-headers-5.14.7-051407-generic
sudo apt-get purge linux-image-5.14.7-051407-generic

sudo apt-get autoremove --purge

then run sudo update-grub

1 Like