Skip to main content
Photo of DeepakNess DeepakNess

How to remove PostgreSQL from macOS

Unproofread notes

I tried uninstalling the PostgreSQL from my macOS Tahoe and the process wasn't very simple, in fact, the uninstaller in the below folder wasn't working at all. Clicking, double-clicking did nothing.

/Library/PostgreSQL/18/uninstall-postgresql.app

Upon looking here and there, I finally found a solution that worked. I ran the following command in my terminal and then the uninstaller window appeared.

sudo /Library/PostgreSQL/18/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh

I then selected Entire Application option and clicked Next and the uninstallation process quickly started and then final window after it was complete looked like this. And then I had to run some more following commands to make sure no residue was left on my computer:

sudo pkill -u postgres

sudo rm -rf /Library/PostgreSQL

sudo rm /etc/postgres-reg.ini

sudo dscl . -delete /Users/postgres

sudo rm /Library/LaunchDaemons/com.edb.launchd.postgresql-18.plist

After this I had to manually go and delete the Postgres 18 folder from the Applications folder. It only contained a Documentation folder.

And this was done after that.

Comment via email