How to Uninstall/Reinstall PostgreSQL (Mac)

PokerTracker 4 version 4.0.x
August 16, 2021
  • Overview

    This guide is for the rare situations when using Apple's OS X when you need to completely reinstall the PostgreSQL Server when advised by PokerTracker technical support.   Following these instructions will delete all databases from your computer, we advise that you backup your databases prior to performing a total reinstall.  These instructions require you to type command line instructions within the OS X Terminal, you will usually find the Terminal inside the /Applications/Utilities.

    • Determining the PostgreSQL Version Already Installed

      To verify which version of PostgreSQL you will be replacing, at the Terminal command line prompt type:

      ls /Library/PostgreSQL/

      The Terminal will respond with a list of all the directories shown in the folder found at /Library/PostgreSQL, each version number will be installed in it's own directory.  In the example shown below we can confirm that PostgreSQL 9.0 is installed. 

      Terminal

      The examples used in this Guide assumes that PostgreSQL version 8.4 is installed, in the event you have a different version of PostgreSQL installed then replace the version number accordingly.  For example, if you need to uninstall PostgreSQL 9.0 then replace /Library/PostgreSQL/8.4/ with /Library/PostgreSQL/9.0/ 

    • Uninstalling PostgreSQL
      Tip:  You may need to enter your password after entering any command line that starts with Sudo to comply with OS X security procedures. 

      1) Execute (double click) /Library/PostgreSQL/8.4/uninstall-postgresql which will uninstall the PostgreSQL installation.

      2) Stop the server.

      sudo /sbin/SystemStarter stop postgresql-8.4

      3) Remove menu shortcuts:

      sudo rm -Rf /Applications/PostgreSQL 8.4

      4) Remove the ini file

      sudo rm /etc/postgres-reg.ini

      5) Removing Startup Items

      sudo rm /Library/StartupItems/postgresql-8.4

      6) Remove the data and installed files (all databases will be lost at this point)

      sudo rm -Rf /Library/PostgreSQL/8.4

      7) Delete the user postgres

      sudo dscl . delete /users/postgres 

      8) Reboot your computer

      9) Reinstall PokerTracker 4 and PostgreSQL using the PokerTracker 4 installer, or manually install the latest version of PostgreSQL found at http://postgresql.org

       

      If you have any issues, please contact PokerTracker support for assistance.

       

highfalutin