By Basil Bourque


2017-09-09 01:31:39 8 Comments

Title says it all… How to completely remove a Postgres cluster from a macOS computer?

I used the installer app provided by EnterpriseDB as a courtesy to the community.

This uninstallation question has been asked multiple times on Stack Overflow. But those questions and answers are years out-of-date.

2 comments

@Basil Bourque 2017-09-09 01:31:39

postgres user

The user account named postgres (by default) created by the installer is actually a macOS user account.

  • Apple allows deleting a user account in the more recent versions of macOS: System Preferences > Users & Groups > - button in list, after authenticating with padlock icon in lower corner.
  • In older macOS versions that do not delete user accounts, you may be able to hide that user account.

Every other trace of Postgres can be removed.

Backup/Export

Of course, first backup your database with a tool like pgBackup. And/or export your data.

Uninstaller app

The installer app provided by EnterpriseDB does install an app named Uninstaller. Find it in the Postgres folder, probably located at the root Library folder (not the Library folder in your home folder).

/Library/PostgreSQL/10

Run that uninstaller app, and supply your macOS system password. After the run, the data folder remains as that is owned by the postgres user rather than your regular macOS user. The uninstaller app reminds you of this fact.

/Library/PostgreSQL/10/data

screen shot of the Finder with Postgres data folder selected

data folder

Select that data folder in the Finder, and choose File > Move to trash. When prompted, provide your own macOS user account password.

Delete that outer Postgres folder(s) that contained data.

Applications folder

Remove the PostgreSQL 10 folder in your Applications folder if it remains. Again, provide your own macOS user account password.

screen shot of the Finder showing "PostgreSQL 10" folder in Applications folder

@Vignesh Raja 2018-10-09 12:30:15

If it helps anyone, I found the uninstall.app in /Users/vignesh/PostgreSQL/uninstall folder.

@user3384147 2018-10-10 18:59:02

As an addendum to the current accepted answer:

To remove the Postgres user:

  • Go to System Preferences -> Users & Groups
  • Click the lock icon on the bottom left corner and enter your password
  • Select the Postgres user and click the minus button, confirm in the dialog

Tested on Siera 10.12

Related Questions

Sponsored Content

1 Answered Questions

Postgresql streaming replication slow on macOS

1 Answered Questions

[SOLVED] MySQL 8.0, MacOS, create database issue?

  • 2018-05-10 22:16:28
  • 27_zZ
  • 6467 View
  • 1 Score
  • 1 Answer
  • Tags:   mysql mac-os-x

1 Answered Questions

1 Answered Questions

1 Answered Questions

1 Answered Questions

[SOLVED] How to uninstall PostgreSQL (and pgAdmin3) from OSX Sierra?

Sponsored Content