Skip to content

Instantly share code, notes, and snippets.

@KDTheory
Forked from Atlas7/remove_postgres_on_mac_os.md
Last active October 18, 2018 07:01
Show Gist options
  • Select an option

  • Save KDTheory/6a4ac5eee13991da945fb99f067ef42d to your computer and use it in GitHub Desktop.

Select an option

Save KDTheory/6a4ac5eee13991da945fb99f067ef42d to your computer and use it in GitHub Desktop.
Note - How to completely uninstall PostgreSQL 9.X/10.X on Mac OSX

This a fork from Atlas7 i fork his to only have it on my github account to remember.

How completely uninstall PostgreSQL 9.X/10.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.

Run the uninstaller on terminal window

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

If installed with Postgres Installer, do:

open /Library/PostgreSQL/9.X/uninstall-postgresql.app

Remove the PostgreSQL and data folders. The 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 using System Preferences -> Users & Groups.

Unlock the settings panel by clicking on the padlock and entering your password.
Select the PostgreSQL user and click on the minus button.
Restore your shared memory settings: sudo rm /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment