To remove postgres find the root postgres directory normally like
/Library/PostgreSQL/9.6
run : uninstall-postgresql
will remain the data folder and you have to remove manually.
start new installation (change your version/folder number):
sudo /Library/PostgreSQL/10/bin/pg_ctl -D /Library/PostgreSQL/10/data start
stop postgres:
sudo /Library/PostgreSQL/10/bin/pg_ctl -D /Library/PostgreSQL/10/data stop