Determine xcode command line tools version

command linexcode

How do I determine what version(s) of xcode command line tools I have?

I tried doing

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix

Is the Apple LLVM version the same as the version of xcode command line tools?

Best Answer

Finding the CLI version number depends on the combination of which particular OS and which particular CLI Tools are installed. One of these should work:

On Yosemite & Mavericks:

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

on Mountain Lion:

pkgutil --pkg-info=com.apple.pkg.DeveloperToolsCLI
Related Question