You're probably reading this because you've installed Postgres 20 different ways. It's no wonder, tutorials never work and always leave you hanging so you just move on to the next thing without knowing how to undo what you just did as most of it was command line stuff.
This is almost a straight lift from https://wiki.postgresql.org/wiki/Opinionated_OS_X but I'll try to make it a bit more concise and readable.
Here's the quick and easy way to get Postgres on Mac Mavericks.
- Remove any "Postgres" Applications you might have installed
ps auxw | grep postgresto see any Postgres instances that might be going. The thing to really care about is if something is in your LaunchAgents dir. If it is,
cdto that directory, run
open .and delete the Postgres symlink in that directory.
- Restart your computer to kill all the other Postgres processes (and they won't restart because we removed them from LaunchAgents)
- Install Postgres.app (unzip, drag to Applications folder, open it)
- Open your bash profile (I'm using oh-my-zsh so my profile is located at
~/.zshrc, yours might be at
~/.bash_profileor something) and add
export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"to the bottom of it
- In Terminal run
source ~/.zshrc(or whatever your bash profile file is)