0

Im trying to uninstall PostgreSQL from my Mac machine. Ive deleted the folder from the Application folder, ran sudo rm -rf after cd'ing to /Library/PostgreSQL/myversion. Emptied my trash bin. Ran brew list and brew uninstall --force postgresql, brew remove postgresql and restarted my machine but after all of this im still seeing postgres (PostgreSQL) 11.8 when running postgres --version in the terminal.

Is this normal? Am i missing anything else? Im clueless now!

Thanks in advance.

a_horse_with_no_name
  • 440,273
  • 77
  • 685
  • 758
  • Run `which postgresql` and check the its output (path to postgresql). – Yuri Ginsburg Aug 15 '20 at 07:39
  • When i run it nothing is returned. On another note, I did notice that i have an extra user bucketed under "Other User" named PostgreSQL Standard when looking into System Preferences and User & Groups on my mac. Could this be related? – Rafael Lopez Aug 15 '20 at 12:53
  • Run ```which postgres```. ```postgres``` is the actual Postgres server program. So something got left behind. Or you had more then one version of Postgres installed. At one time Apple included Postgres with its OS, maybe something left over from that? What version of Macos do you have? – Adrian Klaver Aug 15 '20 at 18:00
  • Thanks for that, Im getting now /usr/local/bin/postgres. My Mac verison is Mojave 10.14.5. I probably have 2 versions because when i try to run psql i get 'psql (11.8, server 12.3) WARNING: psql major version 11, server major version 12. Some psql features might not work.' Whats the best route to try now? Ideally i want just one version, thats why at first my intention was to try uninstalling everything. – Rafael Lopez Aug 15 '20 at 18:49
  • Apple no includes Postgresl starting with El Capitan(10.11) so any versions you have come from third parties. To be clear ```brew list``` no longer shows Postgresql installed? Did you maybe install [EDB](https://www.postgresql.org/download/macosx/) or Postgres.app versions? Somewhere you have another ```postgres``` as you are getting ```server 12.3```. – Adrian Klaver Aug 15 '20 at 21:25
  • Dont recall ever installing EDB but i have had postgres.app version in the past for sure. When running brew list im seeing postgresql@11 but then when running the postgres.app server it sin the 12th version. How to get the one in brew list updated to 12? Thanks so much for the help. – Rafael Lopez Aug 15 '20 at 21:34
  • First I would decide whether you want two versions(Brew, postgresq.app) running at the same time. If not uninstall the version you don't want(I thought you had already done that with the Brew version?). Second, do you have data in the 11 version that you need. Upgrading from 11 --> 12 is a jump in major versions and needs a dump/restore of the data. Third, I don't use MacOs so I'm not sure of the Homebrew process. I did find this [Upgrade](https://blog.tafkas.net/2017/10/19/upgrading-postgresql-using-homebrew/) – Adrian Klaver Aug 16 '20 at 15:06
  • Also this [Homebrew Install] (https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula#4158763) – Adrian Klaver Aug 16 '20 at 15:06

0 Answers0