How to Add PostgreSQL Apt Repository for Ubuntu Based OSes

October 14, 2020 | By the+gnu+linux+evangelist | Filed in: Tutorial.

GNU/Linux Ubuntu Based Add PostgreSQL Apt Repository

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

So the PostgreSQL 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 Apt Repository for Ubuntu Based OSes - Featured
  1. 1. Launching Terminal

    Open a Terminal Shell Emulator Window:
    Ctrl+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Open Terminal
    Or login into Server Shell.
  2. 2. Setting Up PostgreSQL Repository

    First, Make the PostgreSQL Apt Repo File On Ubuntu 21.10 run:

    sudo su -c 'echo "deb [arch=amd64] impish-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
    Again for Ubuntu 21.04 run:

    sudo su -c 'echo "deb [arch=amd64] hirsute-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    And so for Ubuntu 20.04 Focal, Mint 20.x, Elementary OS 6.x, Zorin OS 16.x, Bodhi 6.x, Lite 5.x…:

    sudo su -c 'echo "deb [arch=amd64] focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    For Ubuntu 19.10 Eoan do:

    sudo su -c 'echo "deb [arch=amd64] eoan-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    For Ubuntu 19.04 Disco do:

    sudo su -c 'echo "deb [arch=amd64] disco-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    Instead, on Ubuntu 18.10 Cosmic:

    sudo su -c 'echo "deb [arch=amd64] cosmic-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    In Ubuntu 18.04, Mint 19.x, Elementary OS 5.x, Zorin OS 15.x, Bodhi 5.x, Lite 4.x…:

    sudo su -c 'echo "deb [arch=amd64] bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

    For Ubuntu 17.04 Zesty and 17.10 Artful:

    sudo su -c 'echo "deb [arch=amd64] 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 [arch=amd64] 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 [arch=amd64] trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  3. 3. Adding PostgreSQL GPG Key

    Then Import GPG Key
    Just run:

    wget --quiet -O - | sudo apt-key add -
  4. 4. Refreshing PostgreSQL Repos

    Finally, Refresh Apt Repositories
    Simply play:

    sudo apt update
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.


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

QuickChic Theme • Powered by WordPress