Question

Apt update error NO_PUBKEY 871920D1991BC93C

Whenever I run apt-update i get the error NO_PUBKEY 871920D1991BC93C. I have tried removing the key file, and I have removed it multiple times and re-added it via curl, wget, and apt-key commands each time. Neither work, all resulting in the same error. Please tell me what to do. I’m running the latest ubuntu droplet.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
September 27, 2024

Heya,

As mentioned you can share the full error message so we can advise you which step is best to take in your particular case.

You can also try to remove and then re-add the key then run the apt-update command again, however I’ll recommend to provide us with the full error so we can make sure this is the best way to deal with the problem.

Regards

KFSys
Site Moderator
Site Moderator badge
September 27, 2024

Heya,

The NO_PUBKEY 871920D1991BC93C error indicates that your system is missing the public key needed to authenticate packages from a repository.

Try adding the key using a keyserver. In some cases, certain keyservers may be unreliable. You can add the missing key using a trusted keyserver like keyserver.ubuntu.com:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

If this works, you should see a success message and the key will be added.

Heya,

The error you’re encountering indicates that the APT package manager is unable to verify the GPG signature of some repository because it lacks the necessary public key.

Can you share the complete error that you are getting here so I could advise you further?

Also, does this happen with a fresh Droplet or did it happen after installing some specific packages?

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more