Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 6
    --reset normally this must be run as root Commented Feb 14, 2017 at 20:09
  • 48
    Thanks. I had uninstalled xcode and installed just the command line tools because I didn't need the whole xcode package on my mac with limited space. However, I was still unable to use commands such as gcc, but after running this command, it works like a charm Commented Jun 22, 2017 at 15:38
  • 1
    I just tried it; now I'm getting "SDK "macosx" cannot be located" lol
    – Jozey
    Commented Dec 28, 2017 at 21:02
  • 3
    --reset works well for me. I need only the xcode cli for php development. So I decided to remove the complete xcode from my mac, then I downloaded only the xcode CLI installer(about 170MB). After I upgrade the installed xcode CLI via app store, and applied sudo xcode-select --reset, I am able to use brewand other command line tools such as git like before. Thanks.
    – vikbert
    Commented Feb 1, 2018 at 11:38
  • 2
    Is there any danger in using --reset? Commented Jun 2, 2019 at 21:48