Sorry for this noob question, but I'm not sure what I just did regarding PostgreSQL. I downloaded and installed Postres.app
from http://postgresapp.com/ Then I decided that I no longer wanted it and would rather just install PostgreSQL with Homebrew. So I dragged Postgres.app
from my applications folder to my trash and then cleaned my trash and rebooted. Now I'm discovering that I can run psql
from the command line with no problem and I appear to be able to create and connect to PostgreSQL databases and so forth. So my question is: was PostgreSQL already installed on my system (Mac 10.8.2 - Mountain Lion)? When I installed Postgres.app, was that just a wrapper that started and stopped the database for me? (If so, why was it a 28 MB download?) Or did I install PostgreSQL when I installed Postgres.app?
Asked
Active
Viewed 1.1k times
5

tadasajon
- 14,276
- 29
- 92
- 144
1 Answers
5
According to this you've done ok with the Trash. You can go through the list of folders it mentions as installation directories and remove them if still present:
- Binaries:
/Applications/Postgres.app/Contents/MacOS/bin
- Headers:
/Applications/Postgres.app/Contents/MacOS/include
- Libraries:
/Applications/Postgres.app/Contents/MacOS/lib
- Shared Libraries:
/Applications/Postgres.app/Contents/MacOS/share
- Data:
~/Library/Application\ Support/Postgres/var
Also you can check your psql installation running:
$ which psql
It should come from /usr/bin/
if it was installed properly by some source (macports, brew) and I presume the PostgresApp used its own bin folder for it.

Will Vousden
- 32,488
- 9
- 84
- 95

Máté
- 2,294
- 3
- 18
- 25
-
I don't have a `/Applications/Postgres.app` folder, since I trashed it. I do have the directory `~/Library/Application Support/Postgres/var`, though -- but I'm not sure what it's purpose is. Can I just delete the entire `~/Library/Application Support/Postgres` directory? (`var` is the only sub-directory). And does this mean that PostgreSQL came pre-installed on my Mac? – tadasajon Nov 09 '12 at 14:38
-
okay, I deleted the `~/Library/Application Support/Postgres` directory and now when I try to run `psql` from the command line I get a "could not connect to server" message. So I guess I got rid of PostgreSQL and can now reinstall it using Homebrew. – tadasajon Nov 09 '12 at 15:02
-
1I don't think your Mountain Lion came with postgres installed. If you want to play safe before you re-install it from brew/macports you can follow [these steps](http://stackoverflow.com/questions/2715055/how-to-uninstall-postgresql-on-my-mac-running-snow-leopard) they are for Snow Leopard and work the same way on Mountain Lion AFAIK – Máté Nov 09 '12 at 15:14