How do I install a specific version of a formula in homebrew? For example, postgresql-8.4.4 instead of the latest 9.0.
My case:
postgresql
was upgraded from 11 to 12 accidentally (after running brew upgrade
without arguments)Solution:
brew services stop postgresql
brew install postgresql@11
brew link postgresql@11 --force
postgres
to postgres@11
:cd /usr/local/var
ls -lh
mv postgresql@11 postgresql@11-fresh-backup
mv postgres postgresql@11
brew services start postgresql@11
If you have any errors, check /usr/local/var/log/postgresql@11.log
(notice the @11).