If the version included in your version of Ubuntu is not the one you
want, you can use the PostgreSQL Apt Repository. This repository will
integrate with your normal systems and patch management, and provide
automatic updates for all supported versions of PostgreSQL throughout
the support lifetime of PostgreSQL.
The PostgreSQL Apt Repository supports the current LTS versions of 18.04 & 16.04
on the following architectures: amd64 i386 ppc64el
While not fully supported, the packages often work on other non-LTS versions as
well, by using the closest LTS version available. To use the apt
repository, follow these steps:
Create the file /etc/apt/sources.list.d/pgdg.list and add a line for
the repository
deb http://apt.postgresql.org/pub/repos/apt/ YOUR_UBUNTU_DISTRIB_CODENAME_HERE-pgdg main
Import the repository signing key, and update the package lists
The latest version of postgresql-client and postgresql-11 in the Ubuntu 19.04 and 19.10 default repositories is version 11. To install these packages run:
sudo apt install postgresql-client postgresql-11
The latest version of postgresql-client and postgresql-XX in the Ubuntu 20.04 default repositories is version 12.
From https://www.postgresql.org/download/linux/ubuntu/
The latest version of postgresql-client and postgresql-11 in the Ubuntu 19.04 and 19.10 default repositories is version 11. To install these packages run:
The latest version of postgresql-client and postgresql-XX in the Ubuntu 20.04 default repositories is version 12.
Open the terminal and paste:
Then check the status: