I would like to know how to completely remove PostgreSQL on macOS Sierra (10.13.6). I've used this command line:
brew uninstall postgres
But when I reinstall with brew install postgres
I have the old config & content. I would like to make fresh install.
for completely reinstalling postgresql
initially run
brew doctor
and brew update
now uninstall postgresql by running
brew uninstall postgresql
rm -rf /usr/local/var/postgres
rm -rf .psql_history .psqlrc .psql.local .pgpass .psqlrc.local
now reinstalling postgresql will not bring back the previous configs and content
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With