In the past it used to be easy to install CommandLineTools without Xcode. Now I cannot get it to install correctly. Please note: this is not a development question but an installation of software question.

There are many discussions of similar issues, but none exactly what I am seeing.

A short answer to my question would be "it is no longer possible to run CommandLineTools unless full Xcode is installed". I am hoping that is not the case.

I have tried many variations on all the suggested steps, along with attempts at clean uninstallation and starting over. I have gleaned a lot of steps from the following sources:

And likely more pages that I did not record.

I have installed Xcode, uninstalled it, installed and uninstalled standalone CommandLineTools, used xcode-select --switch, and more, all in various combinations.

The result is that when full Xcode is not installed, when trying to run a command, I get the following error message or similar, depending upon the command:

xcode-select: error: tool 'opendiff' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

With full Xcode, the commands work.

In many places in the threads mentioned above, people complain about having to have 6GB of unwanted code; this is no longer incorrect. The current version of Xcode is now 10GB.

My main use of the CommandLineTools is to support MacPorts. As a bonus I like opendiff in some cases where my main tools are farther out of reach.

Is there a solution to this issue?

EDIT: I see that Apple now provides a direct way of installed Command Lines Tools only as Command_Line_Tools_macOS_10.13_for_Xcode_9.4, but it is only for High Sierra. While I am still a hold out to the upgrade to HS, it will be only a very short time before I do this upgrade. Hoping that is the line of least resistance.

  • I recently had to do a software build and I was looking for saving space. The developers tried a lot of tricks up their sleeve and in the end gave up and asked me to get Xcode. I think it really depends on the software. github.com/nodejs/node-gyp/issues/569 nodejs devs had to make some changes to make this work.
    – anki
    Commented Oct 17, 2019 at 14:02

4 Answers 4


Maybe things have changed since this question was originally asked but I had no trouble downloading command-line tools from here:


(I did this after deleting XCode to save about 13 GB of disk space).

enter image description here

  • I think it could be that things have changed. I was able to install Xcode Command Line tools. But my purpose for CLT of running MacPorts is still a bit confusing. You get error messages from MacPorts about not having CLT. But it seems to work anyways, and further people do talk about just ignoring those messages. I am not sure about marking any of the answers as the specific solution at this time, but would like to if I could. Commented Oct 19, 2019 at 19:18

I don't think there's a solution since opendiff calls the GUI program FileMerge which ships with Xcode.

You would want to use another diff tool - perhaps the gnu tools from homebrew or my favorite paid diff tool that has a command line tool - ksdiff from Kaleidoscope.

It's a powerhouse of GUI diff goodness for when the command line options don't cut through the task you need done.

  • I have used the opendiff from Command Line Tools for years. And without Xcode. And there are many places on the web giving instructions on how to do such an installation without CommandLineToos. So the real question is have they recently broken that ability? Commented Sep 22, 2017 at 14:58
  • @JeffreySimon OK - the opendiff command line opens FileMerge for me and I don't see that on my Macs without Xcode, but perhaps I'm somehow in the wrong on that part. The part where I like Kaleidoscope a whole lot still remains.
    – bmike
    Commented Jun 10, 2018 at 14:07

You can try solution from here: Github script to install tools from Xcode 3.2.6

I used this to have FileMerge.app without Xcode and works even on High Sierra.


I spend over 3 hours fixing problem with osx 10.14

$ sudo -s
$ touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
  grep "\*.*Command Line" |
  head -n 1 | awk -F"*" '{print $2}' |
  sed -e 's/^ *//' |
  tr -d '\n')
softwareupdate -i "$PROD" --verbose;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .