I was unable to remove postgresql. But finally found it. (I installed postgres using homebrew)
brew list
Find the correct name in the folder. Sort of.
postgresql94
Once you find the correct name:
sudo brew uninstall postgresql94
This should do the removal.
Another shortcut command for her is
sudo brew list | grep postgres | xargs brew uninstall
source
share