Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



macOS - Determine X...
 
Share:
Notifications
Clear all

[Solved] macOS - Determine Xcode command tools version in Terminal

4 Posts
1 Users
0 Likes
658 Views
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
Topic starter  

With all the changes lately, I found it a challenge to determine what version command-line tools I had installed on my Mac.

After all, XCode gives me a rather useless number:

$ xcode-select --version

xcode-select version 2397

But with some help I did find that the CLang version (clang --version) is the indicator we need to look for (now that makes sense, and why is Xcode version not showing this?)

$ clang --version

Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

So there ya go: command line tools 15 ... (in this example)


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
Topic starter  

Well another, probably more correct way (requires XCode to be installed):

xcodebuild -version

Results in:

$ xcodebuild -version  

Xcode 15.0
Build version 15A240d

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
Topic starter  

Interesting additional info is by looking at the install/update history ...

$ softwareupdate --history | grep Command

Command Line Tools for Xcode                       14.2       09/22/2023, 12:54:57  
Command Line Tools for Xcode                       14.3       09/22/2023, 12:54:57  
Command Line Tools for Xcode                       15.0       09/22/2023, 12:54:57  

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
Topic starter  

And another way to test this:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

   
ReplyQuote
Share: