I have Apple’s developer tools installed on my Mac and there is some linking weirdness that is preventing some of the binaries from running. The problem was not solved by reinstalling Xcode and its command-line tools, either the public version 4 or the developer-preview version 5. How can I completely delete the command-line tools in preparation for reinstalling them cleanly?
As stated by Cocoanetics here, you can use this script to remove the tools completely:
Pay attention to the disclaimer right under the script on that page: