I frequently receive errors as follows while running apt-get update:

gpg: keyblock resource `/etc/apt/trusted.gpg.d/pdfmod-team-ppa.gpg': resource limit 
gpg: keyblock resource `/etc/apt/trusted.gpg.d/rael-gc-scudcloud.gpg': resource limit 
gpg: keyblock resource `/etc/apt/trusted.gpg.d/voldyman-markmywords.gpg': resource limit

The above keys are just examples and not limited to those programs. It occurs generically with all software that I added from a PPA.

  • Curious, how do you add the PPA normally?
    – user173
    Commented Jul 1, 2015 at 11:12
  • This looks like an issue where there are too many keyrings, and there are instructions to fix it over on AskUbuntu.
    – Lewis Goddard
    Commented Jul 1, 2015 at 12:09
  • @rifsta With add-apt-repository -y ppa:<ppa-name>. @LewisGoddard I found another solution suggesting to use launchpad-getkeys. Should I add it below as an answer myself?
    – orschiro
    Commented Jul 2, 2015 at 6:09
  • @orschiro yes, I think you should. Commented Jul 3, 2015 at 10:06
  • It worked. Before that I tried to import keys manually with no success.
    – user5529
    Commented Jul 10, 2016 at 9:39

2 Answers 2


This seems to be this bug.

Someone suggested this:

The solution that worked for me was emptying /etc/apt/trusted.gpg.d, running apt-get update, and then manually adding every key it blocked on to the main /etc/apt/trusted.gpg keyring with apt-key adv as described above.

So run these commands

sudo mv /etc/apt/trusted.gpg.d/ /etc/apt/trusted.gpg.d.backup
sudo mkdir /etc/apt/trusted.gpg.d
sudo chmod 755 /etc/apt/trusted.gpg.d

and add each key again with this:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5


sudo apt-get install launchpad-getkeys

where you replace the hash with your needed key's hash.

  • I just added an option to use launchpad-getkeys which if you do a hexdump -C on the binary you can see it is just a loop of apt-key adv .... Commented Jun 30, 2018 at 3:04

One may try launchpad-getkeys.

  1. Delete all the contents in /etc/apt/trusted.gpg.d/.
  2. Add $ sudo add-apt-repository ppa:nilarimogard/webupd8 repository
  3. sudo apt-get update your local database
  4. Install $ sudo apt-get install launchpad-getkeys
  5. Run $ sudo launchpad-getkeys
  6. Check $ sudo apt-get update if the error is gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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