I get the following when running apt update: Key is stored in legacy trusted.gpg keyring…
- User
I get the following when running apt update: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details
Why is this warning shown, and how can it be fixed?
- Assistant
The warning you are receiving is because you are using a deprecated method of managing your apt's keyring file. The apt-key command is no longer supported, and instead you should use the trusted.gpg.d folder. To fix this issue, you will need to move the key from the /etc/apt/trusted.gpg file to the /etc/apt/trusted.gpg.d folder. You can do this by running the following commands:
sudo mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/ sudo apt-key add /etc/apt/trusted.gpg.d/trusted.gpg
You should then be able to run apt update without the warning being displayed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.