While running apt update
you may get errors like this:
W: http://linux.dropbox.com/ubuntu/dists/disco/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
The key needs to be exported into a file in /usr/share/keyrings
and the key removed from the legacy trusted.gpg
keyring.
First, list the keys to get the key ID:
apt-key list
In this case the Dropbox key is 5044912E
:
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2010-02-11 [SC]
1C61 A265 6FB5 7B7E 4DE0 F4C1 FC91 8B33 5044 912E
uid [ unknown] Dropbox Automatic Signing Key <linux@dropbox.com>
Export the key into a file:
apt-key export 5044912E | sudo gpg --dearmour -o /usr/share/keyrings/dropbox.gpg
Delete the key from the legacy keyring:
sudo apt-key del 5044912E
Edit the sources.list
(usually /etc/apt/sources.list.d/dropbox.list
) file for Dropbox and specify the path to the exported key. As an example:
deb [arch=i386,amd64 signed-by=/usr/share/keyrings/dropbox.gpg] http://linux.dropbox.com/ubuntu disco main