DEV Community

trycatch
trycatch

Posted on • Updated on

Install pgadmin4 using apt on Ubuntu 20.04

Problem

You type sudo apt install pgadmin, press TAB and see only pgadmin3 in recommendations. pgadmin3 is currently obsolete and it doesn't even work properly with the latest PostgresQL!

Solution

1) Install pgadmin's public key (if you haven't done this before)

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
Enter fullscreen mode Exit fullscreen mode

2) Add pgadmin's repo to your source list and run update

sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
Enter fullscreen mode Exit fullscreen mode

3) Install the package

sudo apt install pgadmin4
Enter fullscreen mode Exit fullscreen mode

4) Run pgadmin4 in the console or from the main menu (press Win button and type "pgadmin"), done!

Read more about postgres on my blog

Top comments (0)