Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I ran this command in the Terminal:

sudo apt-get update

Updating ends with the following error report:

W: A 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 precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>

W: GPG error: http://ppa.launchpad.net precise Release: The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release  

What does this mean and why is it happening?

share|improve this question
4  
I saw similar issue when I first installed the 12.04. After that I changed the "Software Sources" from the software manager from India to another server. Now I am not seeing this issue. If you are using India server, change it and let us know. –  Abhijeet May 4 '12 at 18:11
    
Thanx Abhijeet. I am an Indian but staying here in Qatar.I changed server to Saudi Arabia.But same result. –  beeju May 4 '12 at 18:19
add comment

8 Answers 8

Try this:

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
share|improve this answer
2  
I tried this but this time,it took more time to update but signature error still exists. –  beeju May 4 '12 at 19:31
5  
thanks for this, this worked. wonder why my /var/lib/apt/lists gets corrupted? –  cboettig Jul 2 '12 at 16:59
1  
+1 This worked for me on vacation overseas. –  l0b0 Nov 6 '12 at 7:27
    
not really sure what this did but it made my errors go away! –  Connor Leech Jun 25 at 20:16
add comment

This message is displaying because the gpg key for that repository is missing in your apt-key database.

To import the key, open a terminal and enter these commands

sudo gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16126D3A3E5C1192

You would see the following output if the above is successful

gpg: Total number processed: 1
gpg:               imported: 1

Then run this command:

sudo gpg --export --armor 16126D3A3E5C1192 | sudo apt-key add - 

Note the - sign after add.

Then sudo apt-get update, you will have no such messages after this.

share|improve this answer
1  
you can accept this answer, if it helps you. –  Anwar Shah May 14 '12 at 14:33
1  
Hmm, this doesn't work for me at the moment. gpg: requesting key 3E5C1192 from hkp server subkeys.pgp.net gpg: key 3E5C1192: public key "Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 –  cboettig Jul 2 '12 at 16:56
    
didn't solve for me either –  Chirag Oct 3 '12 at 21:35
    
didn't work for me –  Chiel92 Mar 27 '13 at 14:32
    
Worked for me. Ubuntu Mini PPC 12.04.2 LTS. –  kuyan Apr 21 '13 at 19:26
show 1 more comment

I found that just doing sudo rm -rf /var/lib/apt/lists && sudo mkdir /var/lib/apt/lists worked for me.

share|improve this answer
add comment

The following commands solved the problem for me:

sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update
share|improve this answer
    
Please 'accept' this answer. :-) –  TomKat Sep 20 '13 at 15:01
    
@TomKat this was the only way that worked for me. :) Thanks. –  Chirag Sep 21 '13 at 8:21
add comment

This tip (from actionparsnip) worked for me:

Try:

sudo fuser -vvv /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade

Found in:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/194077

share|improve this answer
add comment

You can try my script to automatically receive all GPG keys for PPAs you use: smartupdate.sh.

It will launch apt-get update, then find all GPG errors and receive keys for found GPG signatures. In your case, it will just launch

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4C1CBC1B69B0E2F4

but when you add a few unsigned PPAs, it becomes boring to add GPG keys manually. :)

share|improve this answer
add comment

I got a similar error. But instead of BADSIG I got KEYEXPIRED for the PostgreSQL repo:

W: A error occurred during the signature verification.
  The repository is not updated and the previous index files will be used.
  GPG error: http://apt.postgresql.org precise-pgdg Release:
  The following signatures were invalid: KEYEXPIRED 1381654177

The solution is perfectly described here but this is what I did to solve it:

$ sudo apt-key list | grep -B1 PostgreSQL
$ sudo apt-key del ACCC4CF8
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

And now $ sudo apt-get update will work perfectly!

share|improve this answer
add comment

You can use launchpad-getkeys to fix this. Open a terminal and enter:

sudo apt-get install launchpad-getkeys
sudo launchpad-getkeys

Then

sudo apt-get update
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.