Uninstall Postgres 10 on macOS – EnterpriseDB installer

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


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