How to Add PostgreSQL 11 Apt Repository for Ubuntu Based OSes

February 5, 2019 | By thelinuxevangelist | Filed in: Tutorial.

Ubuntu Based PostgreSQL 11 Apt Repo Setup

Hello Linux User! The Tutorial Shows You Step-by-Step How to Add PostgreSQL 11 Apt Repository for Ubuntu Based Systems.

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

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

    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 11 on Ubuntu Like

    Ubuntu PostgreSQL 11 Install

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