So i had an old version of XCode on my computer, and i tried upgrading it with the new mac app store, and it didn’t work. I wanted to uninstall it and then reinstall it using the app store, but they of course don’t have an option to UNINSTALL apps using the app store
Google tells me to just delete the app and then you can click ‘install’ again on the purchases tab in the app store, but since this is xcode, you can’t just drag an application to the trash. You have to run a command using Terminal. So, open terminal and type:
sudo /Developer/Library/uninstall-devtools –mode=all
The directory MIGHT be different, but for me it installed it to /Developer. Anyway, it should list all the packages and then say it deleted them. I restarted my mac just to be safe.
THEN, if it STILL says that xcode is installed, you need to delete the installer from /Applications (different from the Applications folder in your home folder). Go Macintosh HD/Applications and there should be a file called “Install Xcode” and then you can delete that folder, and the ‘install’ button will again be enabled, allowing you to install it from the mac app store and get on with your life


Thank you
[...] http://polygon89.wordpress.com/2011/07/21/how-to-uninstall-xcode4-from-mac-os-x-lion/ [...]
Thanks. Worked perfectly for me.
I did exactly what you said to type in and it kept getting an errot message. I did it so much that terminal told me if I continue there would be a possibility of alot of data being erased Im I going to the wrong terminal or should I just go into developer/library/xcode