How to Add PostgreSQL 10 Apt Repository for Debian Based OSes

October 21st, 2017 by thelinuxevangelist

Debian Based Add PostgreSQL 10 Apt Repo




Welcome Linux User! This Tutorial Shows You Step-by-Step Add PostgreSQL 10 Apt Repository for Debian Based Systems.

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

  • Deepin
  • LMDE
  • antiX
  • Parsix
  • Elive
  • MakuluLinux
  • SparkyLinux
How to Add PostgreSQL 10 Apt Repository for Debian Based OSes - Featured
  1. First Make the PostgreSQL 10 Apt Repo File

    For Debian 9 Stretch:
    And for All the Debian Stable Derivatives:

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

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

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

    Instead for Debian 8 Jessie

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

    Finally for Debian 7 Wheezy:

    sudo 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

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