Report this

What is the reason for this report?

SystemError during Ubuntu upgrade: no linux-headers-4.40-166 archive

Posted on April 23, 2021

I am trying to upgrade Ubuntu using sudo do-release-upgrade, and it errors out with:

“SystemError: E:The package linux-headers-4.4.0-166 needs to be reinstalled, but I can’t find an archive for it.”

How do I proceed?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

What I would suggest is that you run these following commands:

sudo apt autoremove
sudo apt purge linux-headers-4.4.0-166
sudo apt install --reinstall linux-headers-generic

This will remove the package and install the current one. When you do these kinds of upgrades there is always the possibility of something going wrong, so it is good to have a backup that you could use to revert to a working state of your server.

Let me know how this goes.

Regards, Boyan

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.