PGDG apt repository for Debian/Ubuntu

Posted on 2012-12-06 by

We are pleased to announce the availability of the PostgreSQL Global Development Group apt repository of PostgreSQL packages for Debian and Ubuntu.

The repository itself is located at, with instructions in the PostgreSQL wiki at The FAQ list is at

The repository already includes the latest PostgreSQL versions released today.

People using the old "" location of this repository should update their sources.list entries.


We aim at building PostgreSQL server packages as well as extensions and modules packages on several Debian/Ubuntu releases for all PostgreSQL versions supported.

Currently, we support

  • Debian 6.0 (squeeze), 7.0 (wheezy), and unstable (sid)
  • Ubuntu 12.4 (precise), support for lucid is being worked on
  • PostgreSQL 8.3, 8.4, 9.0, 9.1, 9.2
  • Several server extensions such as Slony-I, various PL languages, and datatypes
  • Applications like pgadmin3, pgbouncer, and pgpool-II

Packages for older PostgreSQL versions and older Debian distributions will continue to stay in the repository; updates for those will be provided on an ad-hoc basis.


To use the repository, do the following:

Import the repository key from

wget -O - | sudo apt-key add -

Edit /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example, replace squeeze with the actual distribution you are using:

deb squeeze-pgdg main

Configure apt's package pinning to prefer the PGDG packages over the Debian ones in /etc/apt/preferences.d/pgdg.pref:

Package: *
Pin: release
Pin-Priority: 500

Note: this will replace all your Debian/Ubuntu packages with available packages from the PGDG repository. If you do not want this, skip this step.

Update the package lists, and install the pgdg-keyring package to automatically get repository key updates:

apt-get update
apt-get install pgdg-keyring

More information:

Repository Key

The repository key used has id ACCC4CF8 and fingerprint B97B 0AFC AA1A 47F0 44F2 44A0 7FCC 7D46 ACCC 4CF8. The key is signed by Christoph Berg's keys that are well connected in Debian's web of trust.


Work on setting up the archive was kindly supported by credativ, Redpill Linpro, 2ndQuadrant, and the European Union's Seventh Framework Programme. The build server is kindly hosted by DG-i. The archive is hosted on hardware.