I first had Command Line Tools for Xcode installed and then installed the Xcode app. I have now deleted the Xcode.app application bundle but still have Command Line Tools for Xcode installed.

However, now when I try to compile via Terminal it says:

xcrun: error: active developer path ("/Volumes/Macintosh HD/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

Before I had the Xcode.app installed, it compiled just fine via the Command Line Tools for Xcode. How can I again compile via Command Line Tools for Xcode now that I've deleted the Xcode application bundle?

  • 1
    Looks like you just have to install Xcode!
    – Edric
    Nov 10, 2016 at 11:25
  • Is there any other way to compile via Command Line Tools?
    – Abhishek
    Nov 10, 2016 at 11:27
  • Nope. You need to reinstall Xcode.
    – IconDaemon
    Nov 10, 2016 at 11:53
  • Go to Apple Developer site to download the standlone package:developer.apple.com/download/more
    – Vincent
    Nov 10, 2016 at 12:08
  • The package name is: Command Line Tools(OS X & macOS) for Xcode 7 or Xcode 8.
    – Vincent
    Nov 10, 2016 at 12:10

1 Answer 1


If you now only have the Command Line Tools for Xcode installed and having deleted the Xcode.app application bundle, then you need to run the following command in Terminal to use the Command Line Tools for Xcode.

xcode-select -switch /Library/Developer/CommandLineTools

You must log in to answer this question.

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