Home > database >  How to delete Postgres on Mac
How to delete Postgres on Mac

Time:01-28

I deleted postgres on my my. However the "postgres" user is not gone. I tried with

sudo rm -rf /var/lib/postgresql
sudo rm -rf /var/log/postgresql/
sudo rm -rf /etc/postgresql/

I don't know why PostgreSQL still appears.

enter image description here

CodePudding user response:

Try with this

sudo userdel -f PostgreSQL

UPDATE

  1. List all User Accounts

$ /usr/bin/dscl . -list /Users

  1. Follow the command to Delete a User Account

$ sudo /usr/bin/dscl . -delete /Users/<USER_ACCOUNT>

Example:

$ sudo /usr/bin/dscl . -delete /Users/PostgreSQL

  1. List all User Accounts

$ /usr/bin/dscl . -list /Users

  •  Tags:  
  • Related