How to Add PostgreSQL 12 Apt Repository for Debian Based OSes

October 23, 2019 | By thelinuxevangelist | Filed in: Tutorial.

GNU/Linux Debian Based Add PostgreSQL 12 Repository

Welcome Linux User! The Tutorial Shows You Step-by-Step How to Add PostgreSQL 12 Apt Repository for Debian GNU/Linux Based Systems.

So the PostgreSQL 12 Apt Repo Setup is Valid also for:

  • Kali Linux
  • Deepin
  • MX Linux
  • antiX
  • Parrot
  • Netrunner
  • Voyager
  • LMDE Linux
  • SparkyLinux
  • Q4OS
  • MakuluLinux
  • Steam OS
  • Elive Linux
How to Add PostgreSQL 12 Apt Repository for Debian Based OSes - Featured
  1. First Make the PostgreSQL 12 Apt Repo File
    For Debian Testing/Bullseye, Kali Linux
    And for All Debian Testing Based:

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    

    For Debian Stable/Buster
    And for All the Debian Stable Derivatives:

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    

    Then for Debian Sid/Unstable
    And for All the Debian Unstable Based systems:

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    

    Next for Debian OldStable/Stretch:

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    

    Instead, for Debian Jessie

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    

    Finally, for Debian Wheezy:

    su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" \
    > /etc/apt/sources.list.d/pgdg.list'
    
  2. Then Import GPG Key

    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
    sudo apt-key add -
    
  3. Finally, Refresh Apt Repositories

    sudo apt update
  4. How to Install PostgreSQL 12 on Debian Like

    Debian PostgreSQL 12 Install

Tags: , , , , , , , , , , , , , , ,