Complete Un-installation of PostgreSQL from Mac OS X Lion


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.

  1. Open a terminal window

    Utilities->Terminal

  2. Run the uninstaller

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

    PostgreSQL Uninstall Wizard
    PostgreSQL Uninstall Wizard in Progress

    Data not removed after PostgreSQL Uninstallation
  3. Remove the PostgreSQL and data folders (Wizard will notify you that these were not removed)

    sudo rm -rf /Library/PostgreSQL

  4. Remove the ini file

    sudo rm /etc/postgres-reg.ini

  5. 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.

Remove PostgreSQL User

 

Advertisements

Author: Frankie Inguanez

I am a Data & Software Consultant from Malta with a specialisation in Business Intelligence & Data Mining. Currently, a senior lecturer and software developer at MCAST focusing on Databases, Business Intelligence and Applied Computational Intelligence modules at degree level. As a developer, I have been working on the development of a management information system together in a small team using PostgreSQL, Spring, Jira, Confluence, Git, amongst other tools. My first degree was a B.Sc.(Hons.) at the University of Malta then I graduated at De Montfort University in M.Sc. Business Intelligence Systems and Data Mining where I was recognised with the Best Student and Best Project awards. My postgraduate research was then presented and published in an IEEE conference in Berlin in 2016. During my free time, I try to find a balance between photography, diving, guitar playing and an occasional camping or walk in the countryside.

5 thoughts on “Complete Un-installation of PostgreSQL from Mac OS X Lion”

  1. Thanks đŸ™‚ have you any way to uninstall system default postgresql (perhaps 9.0.5) from mac os lion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s