82

I installed Xcode command line tool by issuing xcode-select --install; now I want to uninstall it (without uninstalling Xcode).

I've tried

sudo /Developer/Library/uninstall-devtools --mode=all

but then I get the error

sudo: /Developer/Library/uninstall-devtools: command not found
Aaron Brager
66.4k21 gold badges169 silver badges295 bronze badges
asked Dec 12, 2014 at 6:58
3

3 Answers 3

101

If you installed the command line tools separately, delete them using:

sudo rm -r /Library/Developer/CommandLineTools
gagarine
4,3842 gold badges32 silver badges40 bronze badges
answered Apr 24, 2015 at 23:55
Sign up to request clarification or add additional context in comments.

2 Comments

sudo rm -r CommandLineTools is enough, force here you need don't
Then, sudo xcode-select --switch /Applications/Xcode.app
55
+50

An excerpt from an apple technical note (Thanks to matthias-bauch)

Xcode includes all your command-line tools. If it is installed on your system, remove it to uninstall your tools.

If your tools were downloaded separately from Xcode, then they are located at /Library/Developer/CommandLineTools on your system. Delete the CommandLineTools folder to uninstall them.

you could easily delete using terminal:

Here is an article that explains how to remove the command line tools but do it at your own risk.Try this only if any of the above doesn't work.

answered Apr 29, 2015 at 16:19

4 Comments

Which OS are you using ? Try this on terminal cd /Library/Developer/CommandLineTools If you get No such file or directory then the path is not there for sure.
I am able to access it. I think the link is blocked by firewall or something
What's more important, removing this directory doesn't let xcode-select --install work
@Jason I moved/renamed the directory and the xcode-select --install worked just fine
8

You can simply delete this folder

/Library/Developer/CommandLineTools

Please note: This is the root /Library, not user's ~/Library).

answered Jan 16, 2017 at 14:11

2 Comments

No - that doesn't do it... removed the directory... command still works.
Seems your command line tools are not installed separately, and it is installed through Xcode.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.