APT-Key Depreciation

Is there an update for linux users I keep getting an apt-key depreciated error when running updates. It says it doesn’t use trusted.gpg but uses files in trusted.gpg.d/. Is there an updated install method that avoids this error? If so, how can I convert it to use the trusted.gpg.d folder instead of trusted.gpg file?

Current Linux install guide is:

curl -SsL https://playit-cloud.github.io/ppa/key.gpg | sudo apt-key add -
sudo curl -SsL -o /etc/apt/sources.list.d/playit-cloud.list https://playit-cloud.github.io/ppa/playit-cloud.list
sudo apt update
sudo apt install playit

While the depreciated section in apt-key manual says:

       Except for using apt-key del in maintainer scripts, the use of apt-key is deprecated. This section shows how
       to replace existing use of apt-key.

       If your existing use of apt-key add looks like this:

       wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add -

       Then you can directly replace this with (though note the recommendation below):

       wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.asc

       Make sure to use the "asc" extension for ASCII armored keys and the "gpg" extension for the binary OpenPGP
       format (also known as "GPG key public ring"). The binary OpenPGP format works for all apt versions, while the
       ASCII armored format works for apt version >= 1.4
1 Like

I think I figured it out, I just took the first command and instead of piping to

sudo apt-key add - 

I just piped it to gpg command then tee, finished command looks like

curl -SsL https://playit-cloud.github.io/ppa/key.gpg | sudo gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/playit.gpg

The rest of the original instructions should work as written.