Uninstalling Postgres on OSX

We’re doing this all on the command line.

1) Stop the server

sudo /sbin/SystemStarter stop postgresql-8.3

2) Remove menu shortcuts:

sudo rm -rf /Applications/PostgreSQL 8.3

3) Remove the ini file

sudo rm -rf /etc/postgres-reg.ini

4) Removing Startup Items

sudo rm -rf /Library/StartupItems/postgresql-8.3

5) Remove the data and installed files

sudo rm -rf /Library/PostgreSQL/8.3

6) Delete the user postgres

sudo dscl . delete /users/postgres

7) Remove the LaunchDaemon .plist

sudo rm /Library/LaunchDaemon/com.edb.launchd.postgresql-8.4.plist