How Do You Troubleshoot “The repository is not updated and the previous index files will be used.” when You Try to Update Linux?

Problem scenario
You run this: sudo apt -y update

You get this output that includes an error message:

Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:4 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:4 https://dl.google.com/linux/chrome/deb stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
W: Failed to fetch https://dl.google.com/linux/chrome/deb/dists/stable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
W: Some index files failed to download. They have been ignored, or old ones used instead.

What should you do?

Solution
Disable the repository listed after "GPG error". In the GUI of Linux, you can open "Software & Updates." Click on the "Other Software" tab, and uncheck "https://dl.google.com/linux/chrome/deb/ stable main" (if that is the URL in the error you got).

For a command line interface version, you may want to see this stackoverflow posting.
(We have not tried it, so use it at your own risk.)

Leave a comment

Your email address will not be published. Required fields are marked *