Fix Linux Deprecation Warning "Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg)"

Опубликовано: 22 Апрель 2023
на канале: Data Slinger
297
4

This is a quick walkthrough of how to move your gpg keys from the legacy trusted.gpg file and get Linux to stop yelling at you when updating.

Commands used in this video:
List Keys in trusted.gpg
sudo apt-key list

Add keys back if you deleted your trusted.gpg file
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys (characters shown for missing key when updating)

Export keys to keyrings directory
apt-key export (last 8 characters of key you are exporting)|sudo gpg --dearmour -o /etc/apt/keyrings/(descriptive name).gpg

Add to the repo file in sources.list.d
[arch=amd64 signed-by=/path/to/where/you/exported-key.gpg]