Skip to main content

Install PostgreSQL on Debian

· One min read
Mohammad Zakery

PostgreSQL

PostgreSQL Debian

Install using the Apt Repository

Set up the repository

To use the apt repository, follow these steps.

sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt -y install postgresql