A while ago, MySQL version 9 was released and I wanted to keep using version 8 to stay in sync with our production systems.
I found out that Homebrew allows you to pin packages to a specific version so that won't accidentally get upgraded when
running brew upgrade
. Here's how you can do it:
1brew pin mysql
Once you've pinned a package, it won't be upgraded when running brew upgrade
:
1brew upgrade
Warning: Not upgrading 1 pinned package:
mysql 9.0.1_1
To unpin a package, you can use the unpin
command:
1brew unpin mysql
You can also list all pinned packages:
1brew list --pinned
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.