Skip to content

Instantly share code, notes, and snippets.

@Justinzobel
Last active February 23, 2025 09:56
Show Gist options
  • Save Justinzobel/bb6aab8ca0ff0c4e16ad2506f52eaff5 to your computer and use it in GitHub Desktop.
Save Justinzobel/bb6aab8ca0ff0c4e16ad2506f52eaff5 to your computer and use it in GitHub Desktop.
How to add a PPA on Ubuntu without add-apt-repository or the software-properties-common package

I wrote this down as I don't like having to install a handful of dependencies just to add a repository (PPA) on Ubuntu.

I used fish in my example.

Get the signing key URL

  1. Open PPA Page (https://launchpad.net/~fish-shell/+archive/ubuntu/release-3 for example)
  2. Click Tecnical details about this PPA (green writing)
  3. Click the signing key link (this goes to https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=index&search=0x88421E703EDC7AF54967DED473C9FCC9E2BB48DA)
  4. Right click the link after sig cert and copy link (This copied link goes in the curl command to get the key)

Set up the repository on your machine (all run as root)

mkdir -p /etc/apt/keyrings
curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x73c9fcc9e2bb48da' | gpg --dearmor -o /etc/apt/keyrings/fish.gpg
echo "deb [signed-by=/etc/apt/keyrings/fish.gpg] https://ppa.launchpadcontent.net/fish-shell/release-3/ubuntu/ jammy main" | tee /etc/apt/sources.list.d/fish.list
apt update
apt install fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment