In response to a question on stackoverflow, here is a short guide on how to completely uninstall PostgreSQL 9.1 from Mac OS X Lion.
- Open a terminal window
Utilities->Terminal
- Run the uninstaller
sudo /Library/PostgreSQL/9.1/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh
- Remove the PostgreSQL and data folders (Wizard will notify you that these were not removed)
sudo rm -rf /Library/PostgreSQL
- Remove the ini file
sudo rm /etc/postgres-reg.ini
- Remove the PostgreSQL user
System Preferences -> Users & Groups
Unlock the settings panel by clicking on the padlock and enter your password
Select the PostgreSQL user and click on the minus button.
Thanks 🙂
thankssssss
Thanks 🙂 have you any way to uninstall system default postgresql (perhaps 9.0.5) from mac os lion
Thanks for this write up.
One caveat: The uninstall script deleted /usr/lib/libpq.5.dylib on my machine. This is/was a symlink to libpq.5.3.dylib. I had to restore the link by hand.
I am really grateful to the holder of this site who has shared this great
piece of writing at at this place.