GNU/Linux Ubuntu-based Add PostgreSQL 11 Apt Repository
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
 - Linux Lite
 - Bodhi Linux
 - Kde Neon
 - Pop!_OS
 - Voyager
 - Trisquel
 - LXLE
 - feren OS
 - Peppermint
 - Q4OS
 - Linux Ultimate Edition
 
- 
First, Make the PostgreSQL 11 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-Wilysudo su -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
 - 
Then Import GPG Key.
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
(For the Newer Release in case of apt-key Issue see: Gpg.d Keyring Setup Guide.)
 - 
Finally, Refresh Apt Repositories.
sudo apt update
 - 
How to Install PostgreSQL 11 on Ubuntu Like