Saturday, December 12, 2009

Postgres/PostGIS installing and uninstalling prebuilt binaries on OSX

I install and uninstall different versions of Postgres/PostGIS as needed.  EnterpriseDB provides pre-built binary installers that save you from the headache of installing all the bits and pieces needed for PostGIS. A small annoyance is that the uninstall-postgresql app is hidden in /Library/PostgresSQL/(version) directory. Dragging the PostgreSQL folder into the trash does not completely uninstall it as with other OSX applications.

I had problems installing PostGIS using the EnterpriseDB StackBuilder after an uninstall. It would go through the process but it would not create the postgis template.  The components were installed in /Library/PostgresSQL/(version) but I had to create the postgis template manually. In addition, PGAdmin III would list the postgres instances that I had previously uninstalled.

After a bit of hunting around with ls and grep, I found /private/etc/postgres-reg.ini  which contains definitions of the installed and uninstalled databases.  Why there is an ini file in an OSX installation is beyond me, but deleting this file ensures a clean install of the EnterpiseDB binary installers.   


  1. The .ini file is probably an outgrowth of the multi-platform installer software EDB uses in their bundle. One file to rule them all!

  2. Sigh, I wish my apps and my children would clean up after themselves.