Fix Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

From Cheeky Factor

Status: Work in Progress
Publication date:
Last edited by: Garyf
Last updated: 2023 - 08 - 30

The problem

I have always been interested in CFD, so thought I would have a play to see how it works for a car. But I had an issue with apt-key, this explains how to fix the apt-key warning

The resolution

Please note: cheekyfactor.com or the owners of this site cannot be held responsible if things go wrong. You perform these tasks at your own risk.


Device: Lenovo
Operating system: Ubuntu
Software: InsightCAE

Guidance for Lenovo, Ubuntu, InsightCAE

I wanted to install InsightCAE[1]. But I had some issue, so had to install from source in the end.

But this will cover off how I expierienced the issue and how I fixed it.

Open terminal and add the repository:

sudo apt-key adv --fetch-keys http://downloads.silentdynamics.de/SD_REPOSITORIES_PUBLIC_KEY.gpg

This threw an error:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
When I try and update, I get:
W: http://downloads.silentdynamics.de/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.

Which means it won't install.

First, we need to seperate the key from the trusted.gpg, run:

sudo apt-key list

This is the one I'm interested in:

APT key list - the problem entry


We need to export it.

Run:

Export apt key for InsightCAE
Export apt key for InsightCAE

Apologies I can't do the full code here. MediaWiki doesn't like pipes outside brackets.

You will get the error that apt-key has been depreciated, but, when you next run:

sudo apt update

Job done, you will no longer get the error.