Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DAddYE/2135060 to your computer and use it in GitHub Desktop.
Save DAddYE/2135060 to your computer and use it in GitHub Desktop.
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

before all uninstall all previous version of xcode 4.4.

sudo uninstall-devtools –mode=all

All developers tools under xcode 4.4+ are self-contained into XCode.app, before 4.4. all stuff was installed into /Developers

This command cleanup a bit your env.

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

I recommend to rename (if you are using a beta) the filename simply in Xcode.app. This might help the repetition of the next commands.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

3) Let Everyone Know Where XCode Is

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

4) Install X11

Visit http://xquartz.macosforge.org/trac/wiki and download and install 2.7.2+.

You will need to fix the symlink it makes:

sudo ln -s /opt/X11 /usr/X11

5) Reinstall your brews

brew list

Will tell you what you need to check. Try out everything one by one and when one doesn't work brew remove it and then reinstall it. If the install doesn't work, try brew install it --use-gcc to prevent llvm from getting in the way.

Things that gave me issues that I had to remove and install:

  • macvim
  • imagemagick
  • ghostscript
@myobie
Copy link

myobie commented Apr 20, 2012

I have merged your changes into my original gist. Thanks.

@wprater
Copy link

wprater commented May 25, 2012

sudo: uninstall-devtools: command not found

@DAddYE
Copy link
Author

DAddYE commented May 25, 2012

Maybe u haven't a =<4.3 of Xcode

@wprater
Copy link

wprater commented May 25, 2012

The point of this article was for Xcode >= 4.4, correct? Which is what I have installed.

@DAddYE
Copy link
Author

DAddYE commented May 25, 2012

Yep, but if you have a previous version would be safe remove it.

Before 4.4 all stuff is installed under /Developer now is self contained in xcode.app

@DAddYE
Copy link
Author

DAddYE commented May 25, 2012

Updated. I think is more concise. Thanks man for your feedback!

@wprater
Copy link

wprater commented May 25, 2012

Actually, they started bundling stuff into the app before 4.3. I think it was stated in 4.3.x . I should have all previous version removed, however, I cannot find that binary on my system.

@jordanbs
Copy link

jordanbs commented Aug 9, 2012

What's the point of "fixing" the symlink the XQuartz installer makes? This command provided seem to make any changes...

@batpigandme
Copy link

I am having the same problem as @wprater sudo uninstall-devtools –mode=all sudo: uninstall-devtools: command not found

Any recommendations? I want to uninstall Xcode 4.4 on OS 10.8.2

@tjmcewan
Copy link

@batpigandme drap Xcode.app to the trash. It's all in there.

@derryl
Copy link

derryl commented Jul 25, 2013

@batpigandme and @wprater uninstall-devtools is not a global command, you'll need to specify the path. For most people, that means this:

cd /
sudo ./Developer/Library/uninstall-devtools

Although if you're uninstalling a specific version, then specify the appropriate path for that version (e.g. /Developer/Developer-3.2/...)

If you try to run it from the same directory (like I did initially), it will tell you to cd elsewhere before running it... because "this folder is about to be deleted" :)

After it's done, you should manually delete the folder. The script leaves it in place, although it doesn't contain much post-execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment