APT Repo

How to use the Pigsty Extension APT Repo on Debian/Ubuntu Compatible OS?

You can use the following Shell commands to manually add the Pigsty repository GPG key, write the repository definition, and update the cache.

The default repo.pigsty.io repository is hosted on Cloudflare CDN, which may be slow for users in mainland China. You can use the China CDN mirror site repo.pigsty.cc instead of the default repo.pigsty.io repository:


Add Repo

For Debian/Ubuntu and compatible systems, use the following commands to add the Pigsty repository GPG key, write the repository definition, and update the cache:

# Add Pigsty's GPG public key to your system keychain to verify package signatures
curl -fsSL https://repo.pigsty.io/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg

# Get Debian distribution codename (distro_codename=jammy, focal, bullseye, bookworm), and write the corresponding upstream repository address to the APT List file
distro_codename=$(lsb_release -cs)
sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/pgsql ${distro_codename} main
EOF

# Refresh APT repository cache
sudo apt update
# Add Pigsty's GPG public key to your system keychain to verify package signatures
curl -fsSL https://repo.pigsty.cc/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg

# Get Debian distribution codename (distro_codename=jammy, focal, bullseye, bookworm), and write the corresponding upstream repository address to the APT List file
distro_codename=$(lsb_release -cs)
sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/pgsql/${distro_codename} ${distro_codename} main
EOF

# Refresh APT repository cache
sudo apt update

Repo Content

The pigsty-pgsql repository contains:

  • 208 PostgreSQL extension RPM packages (maintained by Pigsty, not included in PGDG YUM repository)
  • 215 PostgreSQL extension DEB packages (maintained by Pigsty, not included in PGDG APT repository)
  • haproxy 3.1
  • redis 7.2

The pigsty-infra repository contains:





Last modified 2025-03-08: update pig sub command doc (e3f88c0)