Homebrew’s instructions to update Xcode CLT fail to address warning

homebrewxcode

Since Catalina, brew doctor has produced the message

Warning: A newer Command Line Tools release is available.

Following the subsequent instructions to

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

has no effect.

How do I make sure that Homebrew recognizes that no newer version of the CLT are available?


HOMEBREW_VERSION: 2.2.17-72-ge4719cb
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: e4719cb6f3207a7aed932dbb9d6f363d6c478cd0
Last commit: 5 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 221abc864bb25f3c0bfa0b0f0237f426f0a056a3
Core tap last commit: 39 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.R94NebSNsk/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/bbedit
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_EMOJI: set
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.4-x86_64
CLT: 11.0.0.0.1.1567737322
Xcode: 11.5
XQuartz: 2.7.11 => /opt/X11

Best Answer

This bug report, which is closed as expected behaviour, has this solution:

MikeMcQuaid: Run xcode-select --install. If that doesn't work check for Mojave system updates. If that doesn't work reboot your machine and try both again. If that doesn't work try to download and install the latest CLT from https://developer.apple.com/downloads/more/

From the discussion under it, it seems you need to have both Xcode's CLT and the /Library CLT.