Fixing Warning Messages Generated By Sudo Apt Update Using GPG Keys For PPA’s In Ubuntu

Well, don’t worry bro, we can fix that in no time!

Before anything else, let’s take a look at one of those ***** warnings:

W: http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Okay, so what’s going on here? Basically, this warning means that there’s a PPA (Personal Package Archive) called team-xbmc that you have added to your system using Software & Updates > Other Software tab. This PPA has an old GPG key that is no longer supported by the latest version of apt.

To fix this, we need to convert the old GPG key into a new format and add it to our trusted keys list. Here’s how:

1. First, let’s find out which PPA has an old GPG key that needs fixing. To do this, run sudo apt-key list in your terminal. This will show you all the GPG keys currently installed on your system and their associated repositories.

2. Look for any entries with a warning message like “Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.” These are the PPA’s that need fixing.

3. For each PPA with an old GPG key, run sudo apt-key export | sudo gpg –dearmour -o /etc/apt/trusted.gpg.d/.gpg to convert the old GPG key into a new format and save it as a .gpg file in your trusted keys list. Replace with the last 8 digits of the GPG key ID (which you can find by running sudo apt-key list) and replace with the name of the PPA that needs fixing.

4. Once you have converted all the old GPG keys, run sudo apt update to refresh your package lists and make sure everything is working properly.

5. If you want to remove any deprecated keys from /etc/apt/trusted.gpg, you can do so by running sudo apt-key –keyring /etc/apt/trusted.gpg del . Replace with the last 8 digits of the GPG key ID that needs removing.

Your warning messages should be gone and your system will be running smoothly again.

SICORPS