1

I need to install a new Version of psql on a Macbook, after i uninstall pg, i try psql --version and it still says "psql (PostgreSQL) 9.3.5."

Pg 9.6 was installed (not installed with Homebrew). I was able to uninstall 9.6. Still says 9.3.5 is installed. But i cannot find any files belonging to any Postgres application.

Is there any way to uninstall any postgtres application 100%?

sema
  • 11
  • 1
  • `psql --version` shows the psql version, not the PostgreSQL version –  Mar 15 '20 at 09:59

2 Answers2

0

There are multiple ways Postgres is installed on a Mac.

  1. Homebrew
  2. EnterpriseDB
  3. Postgres.app

Hence, to uninstall, you need to do that differently.

There are different links and I'll share them here.

  1. Homebrew - brew uninstall postgresql command would do.
  2. EnterpriseDB - https://stackoverflow.com/a/9240197/3413323
  3. Postgres.app - https://postgresapp.com/documentation/install.html

Hope this helps.

Opemipo Bolaji
  • 161
  • 1
  • 3
  • 16
  • Thank you for this, but I think this question is not only about Postgres installing/uninstalling, but also about the cause of psql behavior after postgres uninstalling. I have the same question now, that is why it would be nice to find a full answer to asked question. – kokserek Dec 02 '21 at 08:43
0

This may be because psql depends on postgis service, which requires psql. If it is via Homebrew, you can run below:

brew uninstall --ignore-dependencies postgresql
Lakshit Nagar
  • 303
  • 3
  • 5