My mac has postgresql 10.1 on it, and I need 9.6 for my work website to function on my local machine. Can't find easy instructions on how to uninstall or downgrade to 9.6. Any help would be appreciated!
Asked
Active
Viewed 5.0k times
56
-
how did you get 10.1 on it in the first place? via `brew`, or another installer? – zefixlluja Nov 14 '17 at 20:09
-
I used brew install method – SokrateeS Nov 14 '17 at 20:11
-
5* `brew uninstall postgresql` should allow you to remove the currently installed version * `brew search postgresql` will show you the available versions * `brew install postgresql@9.6` will install if you find yourself switching frequently between postgres versions - you may want to look into using `docker` for handling these – zefixlluja Nov 15 '17 at 07:03
-
You are the man – SokrateeS Nov 15 '17 at 19:23
1 Answers
122
I got this issue as well after running brew upgrade
. Following commands worked for me:
brew uninstall postgresql
brew install postgresql@9.6
brew services start postgresql@9.6
brew link postgresql@9.6 --force

Martin
- 4,042
- 2
- 19
- 29
-
4For those of us using the PostgresApp, click on the elephant icon in the top status bar, click 'Open Postgres', click the icon on the bottom of the Postgres window to open the side panel, click the '+' icon. Now you'll be given a menu where you can select the version you want your Postgres server to run. – Conor Jun 27 '18 at 14:43
-
12Another way is switching to version 9.6 without uninstalling postgresql `brew switch postgres 9.6.3`, then restart postgresql `brew services restart postgresql` – windyzboy Jan 22 '19 at 05:01
-
3Another way is to simply upgrade your data directory. Run this command. Tested for going from 13 to 14: `brew postgresql-upgrade-database` – Scott Oct 13 '21 at 19:09