Updated
protobuf@21 has been disabled because it is a versioned formula
Since Homebrew 7.0.16, released 23 November, brew install protobuf@21 stops with this error. The formula was disabled on 8 January 2026 but kept installing with a warning, because it is also deprecated. 7.0.16 gives the disable precedence.
Two fixes work: move to the protobuf formula, or keep 3.21 in a tap of your own.
The error
Error: protobuf@21 has been disabled because it is a versioned formula! It was disabled on 2026-01-08.We got it, with exit code 1, on Linux x86_64 with Homebrew 7.0.17 on 28 November. In October, on a GitHub macOS arm64 runner with Homebrew 7.0.9, the same command installed protobuf@21 with a warning.
On GitHub's macos-15 runners, the build-check jobs of openthread/ot-br-posix failed with the same message in the step that runs brew reinstall jsoncpp ninja protobuf@21 googletest. They last passed at 09:42 UTC on 23 November and first failed on main at 17:41 UTC, about five hours after 7.0.16 was published. Failed run
Homebrew removes a disabled formula one year after its disable date. Homebrew docs A homebrew-core maintainer wrote on 24 November that protobuf@21 stays "until 1 year autoremoval", so about 9 January 2027. homebrew-core #327695 After that the error changes to No available formula with the name. The install fails either way.
Find it in your repository
Run this from the top folder of your repository:
grep -rn --include='*.yml' --include='*.yaml' --include='Brewfile' \
--include='CMakeLists.txt' --include='*.cmake' --include='*.sh' \
'protobuf@21' .It reads workflows, Brewfiles, CMake files and shell scripts, .github included, and prints each file and line. A line where brew install or brew reinstall names it, or brew "protobuf@21" in a Brewfile, is the one that fails. A path with opt/protobuf@21 in it, usually in a CMake file, is a hard-coded prefix: it decides which fix fits. For other file types, add an --include.
Fix 1: move to protobuf
Use this if you need protoc and the protobuf library, not version 3.21 itself. ot-br-posix did this. ot-br-posix #3713
Change brew install protobuf@21 to brew install protobuf, and brew "protobuf@21" to brew "protobuf" in a Brewfile. Where a file names opt/protobuf@21, pass $(brew --prefix protobuf) instead. Then check which version you got:
brew install protobuf
protoc --versionOn 28 November it printed libprotoc 36.2, a much newer protobuf than 3.21.
ot-br-posix also changed its CMake discovery: it tries find_package(Protobuf CONFIG) first, which in its words supplies the Abseil targets and compile features automatically. We built a small project with its discovery code from before and after that change against protobuf 36.2, on Linux with GCC 16.2 and CMake 4.5.1. Both built and ran, and targets that asked for C++11 compiled as C++17. We did not test AppleClang or macOS.
If you build with CMake, delete the build directory after the switch and configure into an empty one. Where the build writes its generated files into the build directory, deleting it worked in every run we made, with both generators and both discovery modes. Reconfiguring in place kept linking 21.12, with no error, while protobuf@21 was still installed. Once protobuf@21 was removed, the old FindProtobuf discovery failed because a protobuf@21 header could not be read. cmake --fresh found 36.2, but when the source files were older than the build output (a checkout unchanged since the build), the build then failed with Unix Makefiles in three of our four setups, on .pb.h files that 3.21's protoc had generated. With Ninja, --fresh regenerated them in all four.
If your CI caches the build directory, the restored copy counts too: put the protobuf version in the cache key, or add a step that deletes the restored directory before you configure. (actions/cache documents that an existing entry cannot be updated, so with an unchanged key the old directory comes back on every run.) We restored build directories with the tar options that actions/cache uses, but did not run actions/cache itself. --fresh worked on a fresh checkout, where the .proto files are newer than the restored output. On a checkout that kept its old file times, it failed as above with Makefiles. To see which protobuf a build directory is set up to use, run this:
grep -iE 'Protobuf_(DIR|LIBRARY_RELEASE|PROTOC_EXECUTABLE)' build/CMakeCache.txtEvery path it prints should name protobuf, not protobuf@21. We ran these builds on Linux with CMake 4.5.1, on two small projects with one .proto file each: one with its own generate rule, one using protobuf_generate(). Each was built with the old FindProtobuf module and with CONFIG discovery (the four setups above), and with Unix Makefiles and Ninja. Both wrote the generated files inside the build directory. We did not test macOS. If your build writes the generated files somewhere other than the build directory, deleting the build directory will not remove them.
If your repository commits its generated .pb.cc and .pb.h files, deleting the build directory does not help. In our test, an empty build directory failed with the same #error in all four runs (old FindProtobuf module and CONFIG discovery, each with Unix Makefiles and Ninja). The message says a newer protoc made the file, though the committed copy came from the older 3.21. To see whether you commit them, run this in the repository:
git ls-files | grep -E '\.pb\.(cc|h)$'If it prints anything, generate those files again with the protoc from the new formula, then build. Use the same --proto_path (or -I) and --cpp_out that generated the committed files, and your own .proto files as arguments. For example, if the files are in gen/api/ and the .proto is at proto/api/foo.proto, this writes gen/api/foo.pb.cc and gen/api/foo.pb.h:
"$(brew --prefix protobuf)/bin/protoc" --proto_path=proto --cpp_out=gen api/foo.protogit status should then list the .pb.cc and .pb.h files as changed; commit them. If it lists them as new (??) instead, --cpp_out points one directory too deep or too shallow. If it lists nothing, protoc either printed an error or ran as the old 3.21 version, which writes the same files again. In both cases the build still fails. The new header only accepts the protobuf version it was made with (36.2 when we ran this), so regenerate again after a protobuf upgrade, or stop committing the files. The new files built in the existing build directory and in an empty one, in all four runs. We tested one .proto file in one project, on Linux.
Fix 2: keep 3.21 in a tap of your own
Use this if you need libprotoc 3.21, or a path with opt/protobuf@21 in it that you can't change yet.
Once, in your repository: copy Homebrew's formula without its deprecate! and disable! lines, then commit the file.
mkdir -p homebrew-formula
U=https://raw.githubusercontent.com/Homebrew/homebrew-core/main
tmp=$(mktemp -d homebrew-formula/.tmp.XXXXXX) &&
curl -fsSL "$U/Formula/p/protobuf@21.rb" -o "$tmp/f.rb" &&
curl -fsSL "$U/LICENSE.txt" -o "$tmp/lic" &&
{ sed 's/^/# /' "$tmp/lic"; grep -vE '^ *(deprecate|disable)!' "$tmp/f.rb"; } > "$tmp/new" &&
mv "$tmp/new" homebrew-formula/protobuf@21.rb
s=$?; rm -rf "$tmp"; [ "$s" = 0 ]If either download fails or is cut off, the command exits with an error and leaves the copy you already have as it was. Do it before 9 January: after the removal, main no longer has the file. Homebrew's formulae are under the BSD 2-Clause licence, which asks copies to keep its notice, so the command puts the whole licence at the top of your copy as comments.
In CI, in place of brew install protobuf@21:
[ -d "$(brew --repository local/pins)" ] || brew tap-new --no-git local/pins
cp homebrew-formula/protobuf@21.rb "$(brew --repository local/pins)/Formula/"
brew install local/pins/protobuf@21
"$(brew --prefix protobuf@21)/bin/protoc" --versionThe first line makes the tap only if it is missing, so the block also works when you run it again or on a runner that keeps its state. On Linux on 28 November it installed Homebrew's 21.12_1 build and printed libprotoc 3.21.12. brew --prefix protobuf@21 printed /home/, the same opt/protobuf@21 path as before. Apache brpc's macOS CI installs protobuf@21 this way, and both of its protobuf@21 jobs passed on 27 November. We contributed that change. brpc run · apache/brpc #3628
A kept formula keeps the recipe, not Homebrew's support: nobody updates it, and we have not tested it after 9 January.
Other deprecated formulae that stopped on 23 November
7.0.16 changed this for every formula that is both deprecated and disabled, not only protobuf@21. We ran one more such formula, node@20, and it failed the same way:
Error: node@20 has been disabled because it is not supported upstream! It was disabled on 2026-10-28.To see whether a formula you install is disabled, put its name in place of the two below:
for N in protobuf@21 node@20; do
printf '%s ' "$N"
curl -fsSL "https://formulae.brew.sh/api/formula/$N.json" |
grep -oE '"disable(d|_date)":[^,]*' | tr '\n' ' '
echo
doneOn 28 November it printed "disabled":true "disable_date": for protobuf@21 and "disabled":true "disable_date": for node@20. "disabled":true means the disable date has passed. We expect any such formula to fail like these two, but we ran only these two. "disabled":false with a date means it stops on that date.
Sources
- Homebrew 7.0.16 release, 23 November 2026: https://
github.com/ Homebrew/ brew/ releases/ tag/ 7.0.16 - Homebrew/brew #24703, "Unify formula and cask lifecycle handling": https://
github.com/ Homebrew/ brew/ pull/ 24703 - protobuf@21 formula page: https://
formulae.brew.sh/ formula/ protobuf@21 - Homebrew docs, Deprecating, Disabling and Removing Formulae: https://
docs.brew.sh/ Deprecating-Disabling-and-Removing - homebrew-core #327695: https://
github.com/ Homebrew/ homebrew-core/ pull/ 327695 - ot-br-posix failed macOS run: https://
github.com/ openthread/ ot-br-posix/ actions/ runs/ 45230386838 - ot-br-posix #3713: https://
github.com/ openthread/ ot-br-posix/ pull/ 3713 - apache/brpc macOS run, 27 November: https://
github.com/ apache/ brpc/ actions/ runs/ 46015455324 - apache/brpc #3628: https://
github.com/ apache/ brpc/ pull/ 3628
Send corrections to hello@cybernative.ai. We date corrections on this page.