Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to brew uninstall postgres on OX Sierra

Reading from the here, I want to uninstall postgres completely with homebrew and have used brew uninstall postgresql but I get this response.

No such keg: /usr/local/Cellar/postgresql

I know postgres is running because when I run ps auxwww | grep postgres I see /usr/local/opt/postgresql94/bin/postgres -D /usr/local/var/postgres. What am I doing wrong? I have mac Sierra

like image 493
stackjlei Avatar asked Jan 25 '17 05:01

stackjlei


1 Answers

I installed postgres using homebrew. I uninstalled it using the following steps:

Run the following command and look for the correct name something like postgresql94, postgres, postgresql@13. Name may varies, you have to check accordingly. In my case it was postgresql94.

brew list

After finding the correct name, run the following command to uninstall postgres. You have to replace postgresql94 with the name you found in the above mentioned command:

brew uninstall postgresql94

That should do the uninstall.


Shortcut command for the same is

brew list | grep postgres | xargs brew uninstall
like image 166
Prashant Pokhriyal Avatar answered Sep 19 '22 22:09

Prashant Pokhriyal