Ubuntu – The easiest way to resolve apt-get BADSIG GPG errors


I frequently cross this issue, and always have to google for an answer. Does anyone have a permanent fix for BADSIG errors from apt-get?

W: GPG error:
http://download.virtualbox.org lucid
Release: The following signatures were
invalid: BADSIG 54422A4B98AB5139
Oracle Corporation (VirtualBox archive
signing key)

Best Answer

  • Here's the (easiest) solution:

    Type the following commands in the Terminal:

    $ sudo -i
    # apt-get clean
    # cd /var/lib/apt
    # mv lists lists.old
    # mkdir -p lists/partial
    # apt-get clean
    # apt-get update

    Credits: ubuntugeek.com


    If the error occurs again (maybe after a few days/months), open Nautilus as root > navigate to var/lib/apt > delete the "lists.old" folder > then open the "lists" folder and delete the "partial" folder. Now, execute the aforementioned commands again.

  • Related Question