Skip to content

Instantly share code, notes, and snippets.

@Atlas7
Last active March 23, 2023 13:02
Show Gist options
  • Select an option

  • Save Atlas7/b1a40a2ffd85728b33e7 to your computer and use it in GitHub Desktop.

Select an option

Save Atlas7/b1a40a2ffd85728b33e7 to your computer and use it in GitHub Desktop.
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.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
@enriquezrene

Copy link
Copy Markdown

Awesome, thank you

@sxp4u

sxp4u commented Apr 13, 2018

Copy link
Copy Markdown

Thank you! It helps a lot

@vfautsch

Copy link
Copy Markdown

Great guide, thanks!

@auraz

auraz commented Apr 20, 2018

Copy link
Copy Markdown

Thanks

@grassiricardo

Copy link
Copy Markdown

Tranks

@ArnaldoSena

Copy link
Copy Markdown

It's work! Thanks!

@drewdle

drewdle commented May 18, 2018

Copy link
Copy Markdown

Thanks... but for some reason, on my start screen, the Postgres user persists. In the system prefs, the user is not listed at all.

@Marcos-Branquinho

Copy link
Copy Markdown

worked for me! Thanks a lot!

@mrioqueiroz

Copy link
Copy Markdown

Thanks!

@eeliwan

eeliwan commented Jul 8, 2018

Copy link
Copy Markdown

Thanks!

@frmendez

frmendez commented Jul 9, 2018

Copy link
Copy Markdown

thanks

@celsooliveiraTBDE

Copy link
Copy Markdown

Still works like a charm.

@vl4dt

vl4dt commented Jul 18, 2018

Copy link
Copy Markdown

Worked like a charm. very nice!

@kirpheaice

Copy link
Copy Markdown

Thank you very much.

@stella3d

Copy link
Copy Markdown

thank you, this worked great

@AsyaKarapetyan

Copy link
Copy Markdown

I was trying to uninstall with Terminal but I was getting error. Then I tried another way to uninstall from this article and it helped

@tsonny

tsonny commented Aug 27, 2018

Copy link
Copy Markdown

TY SOOOOOOOOO MUCH!!!!

@mtazzari

Copy link
Copy Markdown

Great checklist!

@kadirmaev

Copy link
Copy Markdown

You are the best! Thanks a lot!

@yannlr37

yannlr37 commented Oct 5, 2018

Copy link
Copy Markdown

Thanks !

@jlbokass

jlbokass commented Oct 8, 2018

Copy link
Copy Markdown

Thank you ! it works very well!

@ec-wagner

Copy link
Copy Markdown

Note for macOS High Sierra

  • last step: sudo rm /etc/sysctl.conf --> error: /etc/sysctl.conf: No such file or directory

@Makesh

Makesh commented Oct 25, 2018

Copy link
Copy Markdown

Thank you !!!!!!!!!!!!!!

@sugarac

sugarac commented Oct 31, 2018

Copy link
Copy Markdown

shit. useless

@kissferenc

Copy link
Copy Markdown

thx!

@taka2477

Copy link
Copy Markdown

Thx a lot!!

@kerimsari

Copy link
Copy Markdown

Thank you!! Mille Merci...

@mbifulco

Copy link
Copy Markdown

So glad I found this. Thank you!

@Ibrahimahadi

Copy link
Copy Markdown

NICE

@rlscode

rlscode commented May 22, 2019

Copy link
Copy Markdown

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment