Today i faced a strange problem while updating Xcode from 4.1 to 4.2 using mac app store in lion. Mac store was giving me a option to update Xcode to 4.2. So i pressed update button. It was written 1.6GB. But to my surprise it downloaded around 3.4 GB (i think it downloaded reference library). When download got finished i clicked on Xcode icon in launchpad to install. But after installing Xcode was still 4.1. Many might have faced this problem. Finally i was able to install Xcode. you can follow the steps given below. Correct me if iam wrong here or if it didn't work for you
- Un-Install XCode by command sudo /Developer/Library/uninstall-devtools --mode=all
- Restart your Mac
- Delete the file XCode Install.app from your mac. It could be in your Applications directory or in Downloads or wherever it is. Delete from trash also. (Here Xcode Install.app is the previous installation file which you used to install XCode 4.1 in lion). This is very important step.
- Now go to mac store, search for XCode and install