Apt-key is deprecated and apt sources changed after release-upgrade to 24.04

After making the decision to upgrade to 24.04.1 LTS this issue continues to appear.

sudo apt-key add openvpn-repo-pkg-key.pub
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

There are no keyrings for this package in this directory. Any suggestions?

The answer to your question is addressed here:
https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key

1 Like

Thanks I will look into this and update this incident.
@irihapeti
Myles

Every time there is a grub update I receive this same error message:

N: Skipping acquire of configured file ‘main/binary-i386/Packages’ as repository ‘https://packages.openvpn.net/openvpn3/debian noble InRelease’ doesn’t support architecture ‘i386’

Then I have to add the [amd64] tag to the repository statement.
echo deb [arch=amd64] in the new location for sources.list which is now sources.list.d

This happened today 02.04.2025 I just changed it on 02.01.2025. I am now considering reinstalling * Ubuntu 22.04.5 LTS (Jammy Jellyfish) ›

If I grok this correctly, you should be using deb822 sources. This would make sense, given the mention of sources.list.d. I’d probably adapt your legacy sources list for the ubuntu.sources there. Architecture: amd64 should solve it.

I will add: this does seem like a separate, but related topic from the initial one. You might want to:

  1. report on the results of the original topic and mark the solution to close it if appropriate
  2. move this to a different topic

@wxl I get what you mean about a separate issue. However, this current issue is an extension of the initial issue. I am going to submit this as a bug. The is the first since Ubuntu 4.10 I am personally dealing with an issue such as this. Placing the variable [arch=amd64] does work until I run the next update && upgrade line command.

I will update after I receive a reply from the Ubuntu Bug site.

I think maybe what I said didn’t make sense. Ubuntu is now using a different format of apt sources. That variable you’re using is for the old format. I haven’t really tested what it’s like to try to make old formats work with the new system, but I can imagine it’s got quirks like this. Just adapt to the new format as I suggested and I suspect the problem will go away.

You may be onto something and I just resolved it.

The error message is the result of 24.04.01 can not validate the GPG signature for the listed repository because the repository does not have the correct public key.

  1. I deleted the unrecognized key.
  2. Then I issued the following:

wget -qO - https://packages.openvpn.net/packages-repo.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/openvpn.gpg

Then I was asked to overwrite and I selected Y for yes.

Next I ran the update and the warning disappeared:

sudo apt-get update
Hit:1 https://packages.openvpn.net/openvpn3/debian noble InRelease
Hit:2 https://updates.signal.org/desktop/apt xenial InRelease
Hit:3 Index of /ubuntu noble InRelease
Hit:4 Index of /ubuntu noble InRelease
Hit:5 Index of /ubuntu noble-updates InRelease
Hit:6 Index of /ubuntu noble-security InRelease
Hit:7 Index of /apps/ubuntu/ noble-apps-security InRelease
Hit:8 Index of /xtradeb/apps/ubuntu noble InRelease
Hit:9 https://repo.librewolf.net librewolf InRelease
Hit:10 Index of /apps/ubuntu/ noble-apps-updates InRelease
Hit:11 Index of /infra/ubuntu/ noble-infra-security InRelease
Hit:12 Index of /infra/ubuntu/ noble-infra-updates InRelease
Reading package lists… Done

The warning is none gone. What I going to do is wait a couple of days to update and upgrade to see if the error reappears. Back in the day I remember experience these types of issues with Ubuntu Server but not for Ubuntu Desktop :thinking:

I will update you in a couple of days?

Looks like you probably solved the original problem now.

I’d still urge you to take whatever old formats you have and update them to the new ones.

Here’s some hints in the right direction for that:
https://askubuntu.com/questions/1538841/how-to-convert-apt-repository-in-list-format-to-sources-format

I’ll point out there that there’s some suggestion that the upgrader should take care of this for you. Why that didn’t happen is another question. That might be worth a bug report.

@wxl this all began when I accidentally clicked to upgrade the distro from 22.04.X to 24.04.1 and it has been nightmarish since. Interesting enough, I did write I was going to wait for a couple of days to update && upgrade. I issue the command earlier and since yesterday there are no issues.

What I see is repository files were once stored in /etc/apt/sources.list and since the distro upgrade it is now /etc/apt/sources.list.d. all the files now end with .d. I will review the suggested url.

Edited the title to more accurately describe the question

This is the case however many vendor apps are not aware of the new apt-sources locations. Would one experience the same issues had a fresh installation occurred?

No but your issues are specific to the upgrade. If you had a successful upgrade then it should have done the conversion AFAIK.

@wxl this is the very first time I experienced an issue like this since Ubuntu 4.10. I am clear in understanding how the cloud and now AI has forced many changes for us all globally if one elects to use community (free) open-source apps, desktop and server operating systems. I am going to monitor this issue for a few more days. Today I learned what AFAIK means. :sunglasses:

None of this has to do with the cloud or AI. What it has to do is a very recent change to the format of the sources. That is why you never experienced it before.

I am in agreement. The statement was part of ongoing changes in the IT industry in lieu of the Operating System upgrade.