PostgreSQL Apt Repository
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 LTS versions of Ubuntu (12.04, 14.04 and 16.04) on amd64 and i386 architectures as well as select non-LTS versions(15.10). 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/ trusty-pgdg main
- Import the repository signing key, and update the package lists
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo apt-key add -
sudo apt-get update
For more information about the apt repository, including answers to frequent questions, please see the apt page on the wiki.