Tuesday, November 26, 2019

macos - How can I remove Postgres completely from my Mac?

I have been experiencing spooky behavior with Postgres after using the Mac installer for Postgres. There seems to be an existing half-baked Postgres installation that was already there and remains there after I deleted the Mac GUI installer version from /Applications and /Library. Part of the spooky behavior included being unable after repeated poking and prodding to get a particular user to authenticate with its behavior--but this makes sense if I had two parallel Postgres databases, one for which I was (successfully) setting the user with a particular password, and one which did not have this database set. Now that that version is uninstalled, I have a number of Postgres binaries that crash or give errors if I try to use them:


$ psql
dyld: Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /usr/bin/psql
Reason: image not found
Trace/BPT trap: 5
$

I have not used MacPorts, Fink, or other Unix installers other than Homebrew in the life of this Mac. Homebrew disclaims ownership of a Postgres installation:


# ls /usr/local/Cellar | grep -i postgres
#

So however installed, I have a broken Postgres installation that I would like to wipe completely.


How can I completely wipe Postgres from my system so I can install it with the installer and have one Postgres installation, instead of a spooky one and a half installations?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...