How to Add PostgreSQL 12 Apt Repository for Ubuntu Based OSes

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

GNU/Linux Ubuntu Based Add PostgreSQL 12 Apt Repository

Hi! The Tutorial Shows You Step-by-Step How to Add PostgreSQL 12 Apt Repository for Ubuntu Based Systems.

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

  • Linux Mint
  • Lubuntu
  • Kubuntu
  • Xubuntu
  • Zorin OS
  • Elementary OS
  • Linux Lite
  • Bodhi Linux
  • Kde Neon
  • Pop_OS!
  • Voyager
  • Trisquel
  • LXLE
  • feren OS
  • Peppermint
  • Q4OS
  • Linux Ultimate Edition
How to Add PostgreSQL 12 Apt Repository for Ubuntu Based OSes - Featured
  1. First Make the PostgreSQL 12 Apt Repo File

    For Ubuntu 19.10 Eoan do:

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

    For Ubuntu 19.04 Disco do:

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

    Instead on Ubuntu 18.10 Cosmic:

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

    In Ubuntu 18.04 Bionic LTS Based OSes and Mint 19.x:

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

    For Ubuntu 17.04 Zesty and 17.10 Artful:

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

    Instead, for all Ubuntu 16.04 LTS Based systems, so also on Mint 18.x
    Again for 16.10 Yakkety:

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

    Finally, for all the Ubuntu 14.04 Based systems, Linux-Mint-17.x
    And 14.10-Quantal/15.04-Vivid/15.10-Wily

    sudo su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-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 Ubuntu Like

    Ubuntu PostgreSQL 12 Install

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