Ubuntu update error

I am running Ubuntu 11.10 successfully, until yesterday when the automatic invocation of the Update Manager showed an error.
The update appears to be related to Mozilla products (mainly Firefox?) and upon clicking the “Install Updates” button, I received the error message:
“Requires installation of untrusted packages.
The action would require the installation of packages from unauthenticated sources.”
I attach a Print-Screen *.png file for the full info.
Clicking on “Close” showed that the Update Manager had stopped the process.
Just in case there had been an error in the transmission of data I launched Update Manager manually but the the same thing happened.
I considered updating files one-by-one to catch the culprit, but since all the files appear to be related, I haven’t done so.

Has anyone encountered the same problem? And more to the point: is there a solution?

Can you open a terminal and run:

sudo apt-get update

and look for a section similar to

Reading package lists... Done W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B725097B3ACC3965 W: GPG error: http://us.archive.ubuntu.com oneiric Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

in the output … and post the section.

The update appeared to nearly complete (Fetched 12.4 MB in 4min 42s (43.9 kB/s) ) then hit the error:

Reading package lists… Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com oneiric Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key ftpmaster@ubuntu.com
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/oneiric/Release
W: Some index files failed to download. They have been ignored, or old ones used instead.

I’ll be glad of your help, Mark.

OK, first try this …

Run these commands in sequence:

sudo apt-get clean

then

sudo mv -v /var/lib/apt/lists /var/lib/apt/lists.backup

then

sudo mkdir -p /var/lib/apt/lists/partial

then

sudo apt-get update

Does the last command finish without error now ?

Worked a treat!
OK to do “sudo apt-get upgrade” now?

yup :slight_smile:

You’re a star - as usual! Must be nice to know what you’re doing!
Many thanks, Mark.
Just out of interest: Can you describe briefly the likely cause of the problem?

Probably a corrupt repository GPG key … renaming the /var/lib/apt/lists directory (then recreating it), then running an update, will have re-downloaded all the keys.

Thank you, Mark. You’re a gentleman.

You’re welcome :slight_smile:

By the way:
Assuming “sudo mv -v /var/lib/apt/lists /var/lib/apt/lists.backup” was just a safety action, can it be deleted now?

Yes, you can delete the lists.backup directory … if you wish :slight_smile:

or leave it … up to you.