Installing Celestia without apt-key on Debian-based GNU/Linux distros

Celestia is a well known open-source tool used to visualize real-time 3D space. Now that apt-key has finally been deprecated and is scheduled to last be available in Debian 11 and Ubuntu 22.04, it is recommended to manually store the OpenPGP keys from custom repos and point them infile.

First, let’s obtain and decrypt Celestia’s repository key from the official server:

sudo mkdir -p /etc/apt/trusted.gpg.d &&
curl -s https://celestia.space/packages/celestia.key |
gpg --dearmor |
sudo tee /etc/apt/trusted.gpg.d/celestia.gpg

Now with the key stored, just add the package repository to your system and specify the OpenGPG unencrypted key path before installing:

suite=$(lsb_release -c| cut -f2) &&
[[ $suite =~ ^(xenial|bionic)$ ]] &&
component=universe ||
component=main &&
[[ $suite =~ ^(stretch|buster|xenial|bionic|focal)$ ]] ||
suite=focal &&
echo "deb [signed-by=/etc/apt/trusted.gpg.d/celestia.gpg] \
https://celestia.space/packages $suite $component" |
sudo tee /etc/apt/sources.list.d/celestia.list

Note: If you’re still using a non-LTS Ubuntu release from before 20.04 (Focal Fossa), manually alter suite=focal above to match the previous LTS version released — keep in mind that a Celestia repo for 22.04 (Jammy Jellyfish) isn’t yet available. Otherwise, the one-liner above will handle everything.

You’re good to go now: feel free to sudo apt update && sudo apt install celestia and head on to space. :-)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store