DigitalOcean Agent key deprecation warning in Ubuntu 22.04 (Jammy)

On a fresh Ubuntu 22.04 (LTS) x64 droplet, running apt update && apt upgrade will produce the following warning:

W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

This is a warning, not an error, and it can be fixed manually, but it would be nice for it not to happen in the first place in Ubuntu 22.04+.

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.

I figured out the fix…

If logged in a root (otherwise sudo to be added)

Run apt update

get the error


apt-key export A4C6383F | gpg --dearmour -o /etc/apt/trusted.gpg.d/digitalocean-agent.gpg


Issue still exists…

Also I do not understand the fix… I cannot produce some of the bits they need as I generally do not know how…

I am not clueless but this error is new to me and the fix is confusing…

Where is DigitalOcean fix?

Bobby Iliev
Site Moderator
Site Moderator badge
June 19, 2022

Hi there,

I have just tested this out and it seems to have worked as expected on a fresh new Ubuntu 22.04 Droplet:

wget -qO- | sudo bash
# Output:

Verifying machine compatibility...
Verifying compatibility with script...
Checking architecture support...
Installing Droplet Agent, 1 attempt
Setting up droplet-agent apt repository...
Checking dependencies for installing droplet-agent
Importing GPG public key
Installing droplet-agent
DigitalOcean Droplet Agent is successfully installed

After that, the apt update and apt upgrade also work as expected.

Would you mind confirming how exactly did you install the agent?



Try DigitalOcean for free

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

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

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

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
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 ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.