Skip to content

Instantly share code, notes, and snippets.

@avegancafe
Created July 19, 2019 17:34
Show Gist options
  • Select an option

  • Save avegancafe/0bc695f7f6cbc4d97dbff17cab11b836 to your computer and use it in GitHub Desktop.

Select an option

Save avegancafe/0bc695f7f6cbc4d97dbff17cab11b836 to your computer and use it in GitHub Desktop.
A script to remove any old postgres version.
# After this, you should be free to install any new version without fear of having old data files
#
# Writing this because `brew postgresql-upgrade-database` will sometimes read the wrong version of postgres if
# you have had multiple previous versions of postgres
brew uninstall postgres
brew uninstall postgres@<insert version here>
rm -rf /usr/local/var/postgres
rm -rf /usr/local/var/postgres@<insert version here>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment