How to Solve “The following signatures were invalid: BADSIG” Error in Ubuntu Updates

It’s been a long time since I had connected my Ubuntu notebook to Internet. As a result when I connected it to internet after two weeks of gap, as all of us know that Ubuntu is quite fond of providing updates on a regular basis, I was expecting loads of updates to be provided by Ubuntu.

I typed the following commands in terminal in attempt to update the system.

The “clean” command did nothing.

The sudo apt-get update command came up with an error:

Did you notice the last few lines? Those are the crucial ones and we need to focus on it. It says:

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

That is our culprit here: Invalid signature error BADSIG.

To remove the bad signature error, open the terminal (Ctrl+Alt+T) and use the commands given below one by one:

After using these commands you should get rid of the errors and your Update Manager should be working fine.

Still got problem? Do tell me if you still facing difficulties with the BADSIG or Ubuntu Update Manger. I would like to help you out. Keep in touch by subscribing to the newsletter. Enjoy :)

Image credit: Big Stock Photo

36 comments

  1. Hey, thanks a lot for the solution, you save my Ubuntu :)
    Any clue why that error happened?

    • It happened to me because of Hotel wi-fi that required me to login. That login page wrecked a bunch of crucial files in the apt system by replacing the text of some with the HTML of a page not found error page, and causing this BADSIG error.

  2. Hi Abhishek,
    Thanks for the nice and simple article.
    Can you please explain what above commands will do? Would I lose the old repositories?

  3. This works good in Linux Mint 12 …. had problem with ubuntu canonical package signature.

  4. When i Installed the Package of webmin in ubuntu server

    Commnads ;#apt-get install webmin

    This error Mention
    Reading package lists… Error!
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/us.old-releases.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.

    so How can i Solve this

  5. Hey, Prakash,

    Thanks a bunch for your kindness in sharing your knowledge here. Right on, man!

    I’m starting dealing with Ubuntu server and it was one of the problems I had when running it on Virtualbox, not on a real machine.

    I’m trying to set a server and a network for a customer and dead ended onto a few problems with some windows boxes that I still think are causing me headaches because of the software origin be a kinda questionable. Customer swears it was installed legally by another guy and I shouldn’t touch it or I’ll be opening a brand new can of worms for myself to deal with but I am going to test it with my own software in a virtual environment to check it out!

    YOU’VE SAVED THE DAY!!! KUDOS!!!!

    Talk to you later!

  6. Perfect! And yea, your first reply explains it really well. My college WiFi requires students to login through a web request form. That messed up a lot of stuff. Thanks for the post!

  7. Still not working. Got this:
    $ sudo apt-get update
    Ign http://packages.linuxmint.com maya InRelease
    Ign http://dl.google.com stable InRelease
    Get:1 http://packages.linuxmint.com maya Release.gpg [197 B]
    Get:2 http://packages.linuxmint.com maya Release [17.7 kB]
    Hit http://dl.google.com stable Release.gpg
    Hit http://dl.google.com stable Release
    Get:3 http://packages.linuxmint.com maya/main i386 Packages [18.0 kB]
    Ign http://archive.canonical.com precise InRelease
    Get:4 http://packages.linuxmint.com maya/upstream i386 Packages [10.6 kB]
    Get:5 http://packages.linuxmint.com maya/import i386 Packages [41.4 kB]
    Hit http://dl.google.com stable/main i386 Packages
    Ign http://archive.ubuntu.com precise InRelease
    Ign http://archive.ubuntu.com precise-updates InRelease
    Ign http://security.ubuntu.com precise-security InRelease
    Hit http://packages.medibuntu.org precise InRelease
    Ign http://packages.linuxmint.com maya/import TranslationIndex
    Ign http://packages.linuxmint.com maya/main TranslationIndex
    Ign http://packages.linuxmint.com maya/upstream TranslationIndex
    Ign http://dl.google.com stable/main TranslationIndex
    Get:6 http://archive.canonical.com precise Release.gpg [198 B]
    Get:7 http://archive.ubuntu.com precise Release.gpg [198 B]
    Hit http://security.ubuntu.com precise-security Release.gpg
    Hit http://archive.canonical.com precise Release
    Ign http://archive.canonical.com precise Release
    Hit http://archive.ubuntu.com precise-updates Release.gpg
    Hit http://security.ubuntu.com precise-security Release
    Hit http://packages.medibuntu.org precise/free i386 Packages
    Ign http://dl.google.com stable/main Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en_US
    Ign http://dl.google.com stable/main Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en
    Ign http://archive.canonical.com precise/partner i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise Release
    Ign http://archive.ubuntu.com precise Release
    Ign http://packages.linuxmint.com maya/upstream Translation-en_US
    Ign http://packages.linuxmint.com maya/upstream Translation-en
    Hit http://security.ubuntu.com precise-security/main i386 Packages
    Ign http://archive.canonical.com precise/partner TranslationIndex
    Hit http://archive.ubuntu.com precise-updates Release
    Hit http://security.ubuntu.com precise-security/restricted i386 Packages
    Hit http://security.ubuntu.com precise-security/universe i386 Packages
    Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
    Hit http://security.ubuntu.com precise-security/main TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
    Hit http://packages.medibuntu.org precise/non-free i386 Packages
    Hit http://archive.canonical.com precise/partner i386 Packages
    Ign http://archive.ubuntu.com precise/main i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/restricted i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/universe i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise/main TranslationIndex
    Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
    Hit http://security.ubuntu.com precise-security/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/main i386 Packages
    Hit http://archive.ubuntu.com precise-updates/restricted i386 Packages
    Hit http://archive.ubuntu.com precise-updates/universe i386 Packages
    Hit http://archive.ubuntu.com precise-updates/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse Translation-en
    Hit http://security.ubuntu.com precise-security/restricted Translation-en
    Ign http://packages.medibuntu.org precise/free TranslationIndex
    Hit http://archive.ubuntu.com precise/main i386 Packages
    Hit http://archive.ubuntu.com precise/restricted i386 Packages
    Hit http://archive.ubuntu.com precise/universe i386 Packages
    Hit http://archive.ubuntu.com precise/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise/main Translation-en
    Hit http://archive.ubuntu.com precise/multiverse Translation-en
    Hit http://archive.ubuntu.com precise/restricted Translation-en
    Hit http://security.ubuntu.com precise-security/universe Translation-en
    Hit http://archive.ubuntu.com precise/universe Translation-en
    Hit http://archive.ubuntu.com precise-updates/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en
    Ign http://packages.medibuntu.org precise/non-free TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted Translation-en
    Hit http://archive.ubuntu.com precise-updates/universe Translation-en
    Ign http://archive.canonical.com precise/partner Translation-en_US
    Ign http://archive.canonical.com precise/partner Translation-en
    Ign http://packages.medibuntu.org precise/free Translation-en_US
    Ign http://packages.medibuntu.org precise/free Translation-en
    Ign http://packages.medibuntu.org precise/non-free Translation-en_US
    Ign http://packages.medibuntu.org precise/non-free Translation-en
    Fetched 88.3 kB in 7s (11.5 kB/s)
    Reading package lists… Error!
    W: GPG error: http://archive.canonical.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    W: GPG error: http://archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.

  8. Why is my first comment not posting? I included the results of trying the solution, which didn’t work for me, but my post isn’t coming up. I’ve tried twice to post it. Thanks.

  9. 3rd try:
    $ sudo apt-get update
    Ign http://packages.linuxmint.com maya InRelease
    Ign http://dl.google.com stable InRelease
    Get:1 http://packages.linuxmint.com maya Release.gpg [197 B]
    Get:2 http://packages.linuxmint.com maya Release [17.7 kB]
    Hit http://dl.google.com stable Release.gpg
    Hit http://dl.google.com stable Release
    Get:3 http://packages.linuxmint.com maya/main i386 Packages [18.0 kB]
    Ign http://archive.canonical.com precise InRelease
    Get:4 http://packages.linuxmint.com maya/upstream i386 Packages [10.6 kB]
    Get:5 http://packages.linuxmint.com maya/import i386 Packages [41.4 kB]
    Hit http://dl.google.com stable/main i386 Packages
    Ign http://archive.ubuntu.com precise InRelease
    Ign http://archive.ubuntu.com precise-updates InRelease
    Ign http://security.ubuntu.com precise-security InRelease
    Hit http://packages.medibuntu.org precise InRelease
    Ign http://packages.linuxmint.com maya/import TranslationIndex
    Ign http://packages.linuxmint.com maya/main TranslationIndex
    Ign http://packages.linuxmint.com maya/upstream TranslationIndex
    Ign http://dl.google.com stable/main TranslationIndex
    Get:6 http://archive.canonical.com precise Release.gpg [198 B]
    Get:7 http://archive.ubuntu.com precise Release.gpg [198 B]
    Hit http://security.ubuntu.com precise-security Release.gpg
    Hit http://archive.canonical.com precise Release
    Ign http://archive.canonical.com precise Release
    Hit http://archive.ubuntu.com precise-updates Release.gpg
    Hit http://security.ubuntu.com precise-security Release
    Hit http://packages.medibuntu.org precise/free i386 Packages
    Ign http://dl.google.com stable/main Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en_US
    Ign http://dl.google.com stable/main Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en
    Ign http://archive.canonical.com precise/partner i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise Release
    Ign http://archive.ubuntu.com precise Release
    Ign http://packages.linuxmint.com maya/upstream Translation-en_US
    Ign http://packages.linuxmint.com maya/upstream Translation-en
    Hit http://security.ubuntu.com precise-security/main i386 Packages
    Ign http://archive.canonical.com precise/partner TranslationIndex
    Hit http://archive.ubuntu.com precise-updates Release
    Hit http://security.ubuntu.com precise-security/restricted i386 Packages
    Hit http://security.ubuntu.com precise-security/universe i386 Packages
    Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
    Hit http://security.ubuntu.com precise-security/main TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
    Hit http://packages.medibuntu.org precise/non-free i386 Packages
    Hit http://archive.canonical.com precise/partner i386 Packages
    Ign http://archive.ubuntu.com precise/main i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/restricted i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/universe i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise/main TranslationIndex
    Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
    Hit http://security.ubuntu.com precise-security/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/main i386 Packages
    Hit http://archive.ubuntu.com precise-updates/restricted i386 Packages
    Hit http://archive.ubuntu.com precise-updates/universe i386 Packages
    Hit http://archive.ubuntu.com precise-updates/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse Translation-en
    Hit http://security.ubuntu.com precise-security/restricted Translation-en
    Ign http://packages.medibuntu.org precise/free TranslationIndex
    Hit http://archive.ubuntu.com precise/main i386 Packages
    Hit http://archive.ubuntu.com precise/restricted i386 Packages
    Hit http://archive.ubuntu.com precise/universe i386 Packages
    Hit http://archive.ubuntu.com precise/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise/main Translation-en
    Hit http://archive.ubuntu.com precise/multiverse Translation-en
    Hit http://archive.ubuntu.com precise/restricted Translation-en
    Hit http://security.ubuntu.com precise-security/universe Translation-en
    Hit http://archive.ubuntu.com precise/universe Translation-en
    Hit http://archive.ubuntu.com precise-updates/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en
    Ign http://packages.medibuntu.org precise/non-free TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted Translation-en
    Hit http://archive.ubuntu.com precise-updates/universe Translation-en
    Ign http://archive.canonical.com precise/partner Translation-en_US
    Ign http://archive.canonical.com precise/partner Translation-en
    Ign http://packages.medibuntu.org precise/free Translation-en_US
    Ign http://packages.medibuntu.org precise/free Translation-en
    Ign http://packages.medibuntu.org precise/non-free Translation-en_US
    Ign http://packages.medibuntu.org precise/non-free Translation-en
    Fetched 88.3 kB in 7s (11.5 kB/s)
    Reading package lists… Error!
    W: GPG error: http://archive.canonical.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    W: GPG error: http://archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.

  10. 4th try:
    $ sudo apt-get update
    Ign http://packages.linuxmint.com maya InRelease
    Ign http://dl.google.com stable InRelease
    Get:1 http://packages.linuxmint.com maya Release.gpg [197 B]
    Get:2 http://packages.linuxmint.com maya Release [17.7 kB]
    Hit http://dl.google.com stable Release.gpg
    Hit http://dl.google.com stable Release
    Get:3 http://packages.linuxmint.com maya/main i386 Packages [18.0 kB]
    Ign http://archive.canonical.com precise InRelease
    Get:4 http://packages.linuxmint.com maya/upstream i386 Packages [10.6 kB]
    Get:5 http://packages.linuxmint.com maya/import i386 Packages [41.4 kB]
    Hit http://dl.google.com stable/main i386 Packages
    Ign http://archive.ubuntu.com precise InRelease
    Ign http://archive.ubuntu.com precise-updates InRelease
    Ign http://security.ubuntu.com precise-security InRelease
    Hit http://packages.medibuntu.org precise InRelease
    Ign http://packages.linuxmint.com maya/import TranslationIndex
    Ign http://packages.linuxmint.com maya/main TranslationIndex
    Ign http://packages.linuxmint.com maya/upstream TranslationIndex
    Ign http://dl.google.com stable/main TranslationIndex
    Get:6 http://archive.canonical.com precise Release.gpg [198 B]
    Get:7 http://archive.ubuntu.com precise Release.gpg [198 B]
    Hit http://security.ubuntu.com precise-security Release.gpg
    Hit http://archive.canonical.com precise Release
    Ign http://archive.canonical.com precise Release
    Hit http://archive.ubuntu.com precise-updates Release.gpg
    Hit http://security.ubuntu.com precise-security Release
    Hit http://packages.medibuntu.org precise/free i386 Packages
    Ign http://dl.google.com stable/main Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en_US
    Ign http://packages.linuxmint.com maya/import Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en_US
    Ign http://dl.google.com stable/main Translation-en
    Ign http://packages.linuxmint.com maya/main Translation-en
    Ign http://archive.canonical.com precise/partner i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise Release
    Ign http://archive.ubuntu.com precise Release
    Ign http://packages.linuxmint.com maya/upstream Translation-en_US
    Ign http://packages.linuxmint.com maya/upstream Translation-en
    Hit http://security.ubuntu.com precise-security/main i386 Packages
    Ign http://archive.canonical.com precise/partner TranslationIndex
    Hit http://archive.ubuntu.com precise-updates Release
    Hit http://security.ubuntu.com precise-security/restricted i386 Packages
    Hit http://security.ubuntu.com precise-security/universe i386 Packages
    Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
    Hit http://security.ubuntu.com precise-security/main TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
    Hit http://packages.medibuntu.org precise/non-free i386 Packages
    Hit http://archive.canonical.com precise/partner i386 Packages
    Ign http://archive.ubuntu.com precise/main i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/restricted i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/universe i386 Packages/DiffIndex
    Ign http://archive.ubuntu.com precise/multiverse i386 Packages/DiffIndex
    Hit http://archive.ubuntu.com precise/main TranslationIndex
    Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
    Hit http://security.ubuntu.com precise-security/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/main i386 Packages
    Hit http://archive.ubuntu.com precise-updates/restricted i386 Packages
    Hit http://archive.ubuntu.com precise-updates/universe i386 Packages
    Hit http://archive.ubuntu.com precise-updates/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
    Hit http://security.ubuntu.com precise-security/multiverse Translation-en
    Hit http://security.ubuntu.com precise-security/restricted Translation-en
    Ign http://packages.medibuntu.org precise/free TranslationIndex
    Hit http://archive.ubuntu.com precise/main i386 Packages
    Hit http://archive.ubuntu.com precise/restricted i386 Packages
    Hit http://archive.ubuntu.com precise/universe i386 Packages
    Hit http://archive.ubuntu.com precise/multiverse i386 Packages
    Hit http://archive.ubuntu.com precise/main Translation-en
    Hit http://archive.ubuntu.com precise/multiverse Translation-en
    Hit http://archive.ubuntu.com precise/restricted Translation-en
    Hit http://security.ubuntu.com precise-security/universe Translation-en
    Hit http://archive.ubuntu.com precise/universe Translation-en
    Hit http://archive.ubuntu.com precise-updates/main Translation-en
    Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en
    Ign http://packages.medibuntu.org precise/non-free TranslationIndex
    Hit http://archive.ubuntu.com precise-updates/restricted Translation-en
    Hit http://archive.ubuntu.com precise-updates/universe Translation-en
    Ign http://archive.canonical.com precise/partner Translation-en_US
    Ign http://archive.canonical.com precise/partner Translation-en
    Ign http://packages.medibuntu.org precise/free Translation-en_US
    Ign http://packages.medibuntu.org precise/free Translation-en
    Ign http://packages.medibuntu.org precise/non-free Translation-en_US
    Ign http://packages.medibuntu.org precise/non-free Translation-en
    Fetched 88.3 kB in 7s (11.5 kB/s)
    Reading package lists… Error!
    W: GPG error: http://archive.canonical.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    W: GPG error: http://archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.

Comments are closed.

Sponsored Stories