Ubuntu - apt-key deprecation replacement

I’m in the process of moving my Plex server from Centos to Ubuntu before the support ends for Centos.
I followed the steps in https://support.plex.tv/articles/235974187-enable-repository-updating-for-supported-linux-server-distributions/ and got a deprecation warning about apt-key. Based on what I read, that command is due to be retired soon.

So after reading the man pages and several articles online, here’s what I ended up with:

echo deb [signed-by=/usr/share/keyrings/PlexSign.asc] https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

cd /usr/share/keyrings
sudo curl -O https://downloads.plex.tv/plex-keys/PlexSign.key
sudo mv PlexSign.key PlexSign.asc

I’m sure there’s probably a quicker way to save the PlexSign.key directly to the /usr/share/keyrings with the .asc extension, but I don’t know how yet and went with what I did know.

Hope this helps - and if anyone knows a one-line version of putting the key into the correct location with the changed extension, please chime in - I’d love to learn a shortcut.

installing the package for the first time will auto install the repo, so just

wget https://downloads.plex.tv/plex-media-server-new/1.32.8.7639-fb6452ebf/debian/plexmediaserver_1.32.8.7639-fb6452ebf_amd64.deb
sudo dpkg -i plexmediaserver_1.32.8.7639-fb6452ebf_amd64.deb

will take care of it. There is ongoing work to migrate the key from sha1 to something better (sha512 I think) so you might get warnings for a while until this is completed.

The repo is updated a few days (or more, often lots more) behind the actual releases, so if you want to be bleeding edge you’ll end up updating manaully anyway.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.