How to Fix Linux Mint Warning in Apt-Key

Recently, I have seen a warning when ever I ran the software update. The warning looks like this:

It is possible to repro this issue with the following command in terminal:

sudo apt update

And the warning looks like this:

As you may know, I recently upgraded my Linux Mint to version 21. As part of the upgrade, apt-key is marked as deprecated. The upgrade automatically moved the official application repository to use the key management. But for my DockBarX application, it is an unofficial application repository and was not moved by the upgrade. The way to fix is move the key myself.

After the search online, I found the way this is done. First I need to export the key from the original key ring, then I need to convert it into a gpg file. Lastly, the gpg file should be moved to a specific folder: /etc/apt/trusted.gpg.d/. With the help from our friend internet, I found the way that does it. First, I need to use this command to list out all the keys in my key ring:

sudo apt-key list

Once the list displays, I have to find the key I needed. And it was the first one in the list. The last two number would be the key id: EEAD 66BD. I need to join them together as the key id: EEAD66BD. Then I can use the following command to import the key as a gpg file into the desired location:

sudo apt-key export EEAD66BD | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/dockbarx-key.gpg

The commend uses pipe to truncate two commands into one. The first (left hand side) is for exporting the key, and the second (right hand side) is converting the key data into pgp format and save into that folder we wanted.

Lastly, we need to test the move and making sure it was working. Run this command one more time:

sudo apt update

And the warning output will no longer be there:

Hope this will help if you see similar issue with DockBarX. Thanks for reading and good luck.

Your Comment


Required
Required
Required

All Related Comments

Loading, please wait...
{{cmntForm.errorMsg}}
{{cmnt.guestName}} commented on {{cmnt.createDate}}.

There is no comments to this post/article.