Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop homebrew automatically upgrading postgresql

The brew upgrade command upgrades all packages, so if postgresql is installed with homebrew, the package can be upgraded to a new version incompatible with your databases. How do I prevent this from happening?

like image 689
Obromios Avatar asked Oct 20 '25 05:10

Obromios


1 Answers

Homebrew can be used to pin a package to its existing version, so if you are using version 12, you can pin it using

brew pin postgresql@12

You need to do this for each major version you are using. If later on, you wish to upgrade then you can do

brew unpin postgresql@12
like image 167
Obromios Avatar answered Oct 21 '25 20:10

Obromios



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!