Error during upgrade Ubuntu 20.04.5 to 22.04.1

Hi I was following the Ubuntu 22.04 upgrade instructions here -

When I did -

sudo do-release-upgrade

It was upgrading but it got stuck on this error -

Error during update

A problem occurred during the update. This is usually some sort of
network problem, please check your network connection and retry.

W:Updating from such a repository can't be done securely, and is
therefore disabled by default., W:See apt-secure(8) manpage for
repository creation and user configuration details., W:GPG error: stable Release: The
following signatures couldn't be verified because the public key is
not available: NO_PUBKEY 78BD65473CB3BD13, E:The repository
' stable Release' is not

Restoring original system state

Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Sun Sep 11 13:42:03 2022) ===
=== Command terminated with exit status 1 (Sun Sep 11 13:42:13 2022) ===

I’ve tried the following fix but it didn’t work -

apt-key adv --keyserver --recv-keys 78BD65473CB3BD13

What can I do to fix?

Please advise.

Thank you

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
September 12, 2022

Hello there,

Until the fix is released use the following workaround:

Find the repository configuration file, e.g.:

  1. grep -ir pagespeed /etc/apt*
  2. /etc/apt/sources.list.d/mod-pagespeed.list:deb stable main

Remove the repository configuration file found during the previous step:

  1. mv /etc/apt/sources.list.d/mod-pagespeed.list ~/

Update APT indexes:

  1. sudo apt update



Site Moderator
Site Moderator badge
September 12, 2022

Hi @twc8ac35a8636,

The “key” is “repository can’t be authenticated”

To solve that just use this command:

$ wget -q -O - | sudo apt-key add -

In the past you could add any repo you wanted, now you need their gpg key otherwise doesn't work.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up