Recently I got lots of GPG errors and tried the following methods at various stages:

  1. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3E5C1192 
  2. sudo apt-get install -reinstall ubuntu-extras-keyring 

    (For Ubuntu Extras only)

  3. gpg –keyserver keyserver.ubuntu.com –recv 3E5C1192
    gpg –export –armor 3E5C1192 | sudo apt-key add -
    sudo apt-get update
  4. sudo aptitude -o Acquire::http::No-Cache=True -o Acquire::BrokenProxy=true update`  
  5. sudo -i   
    apt-get clean
    cd /var/lib/apt 
    mv lists lists.old
    mkdir -p lists/partial  
    apt-get clean 
    apt-get update 

I again got BADSIG error for extras.ubuntu.com today. So, I'm really at a loss what's causing this error to occur time and again. I really want to solve this problem once and for all.

  • Post the output of sudo apt-get update so that we can help you. – karthick87 Dec 19 '10 at 4:09
  • Sadly I now get even more errors for my manually added repositories. Here's the output of my sudo apt-get update: paste.ubuntu.com/545647. I'd really appreciate any help on this. – Pawan Neupane Dec 19 '10 at 16:07
  • I think I should also let you know that the errors surfaced after I downloaded all the installed packages to my cache for creating an APTonCD. I'm not sure if it's because of that, though. – Pawan Neupane Dec 19 '10 at 18:13
  • Please confirm: Which Ubuntu version, and what repository (country)? – david6 Jul 29 '12 at 3:42
  • 1
    Method 5 works for me. – david6 Jul 31 '12 at 8:18

You can automatically import all missing GPG keys using:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install launchpad-getkeys
sudo launchpad-getkeys
| improve this answer | |
  • @Pawan, is your question answered? – Ilias Feb 14 '11 at 10:25
  • 2
    What level of trust can be assumed for a third-party 'PPA' for keys? – david6 Jul 29 '12 at 3:34

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