How to Uninstall Xcode

A friend in San Francisco, Rodney Aiglstorfer, was recently jumping through hoops to get Xcode to cooperate with his iPhone. There’s nothing more aggravating than having your application running within the simulator and getting stuck downloading to a device.

At one point in the process he opted to remove the Xcode developer tools and start the configuration from the beginning. Which leads to the tip: should you ever find the need to remove Xcode, run the following from within a terminal window to make it happen:


sudo <Xcode>/Library/uninstall-devtools --mode=all

sudo /Developer/Library/uninstall-developer-folder 


<Xcode> is the directory where the tools are installed. For typical installations the full path is /Developer/Library/uninstall-devtools

Easy enough, just make sure this is what you really intend to do as once it’s gone, it’s gone.


//-------------

http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html



===========================================================

1、卸载之前的XCode

命令行执行下面命令:

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

参看:

http://www.cocoachina.com/bbs/read.php?tid-17767.html

http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html

 

经过试验,AppCleaner 并不能卸载干净,我是在AppCleaner之后再执行 sudo /Developer/Library/uninstall-devtools --mode=all 命令,然后手工删除 /Developer 目录完成卸载的。

 

2、App Store 上提示XCode“已有更新可用于其他账户”

上面卸载完成后,由于之前我安装的XCode4.1 是从别人那里直接Copy过来的安装文件,我的AppStore上打开XCode时,提醒我“已有更新可用于其他账户”

image

但是我明明以上用上面命令把XCode删除了呀。

经过搜索和分析,发现是 Spotlight 在捣鬼,文件和目录删除了,但是索引文件没有被更新。

依次执行下面命令:

cd /System/Library/LaunchDaemonssudo launchctl unload -w com.apple.metadata.mds.plist等待半个小时左右;再继续执行下面命令sudo launchctl load -w com.apple.metadata.mds.plist

第二步的命令是 停止和停用Spotlight 后台服务; 第4步的命令重新启用Spotlight 后台服务 。中间必须有足够长的时间间隔,我在之前试过间隔2分钟,结果没有效果。

这项卸载完成后, 在 App Store 的更新中就不会看到 XCode 了。

 

参看:

如何关闭Spotlight 
http://drawsimin.blog.163.com/blog/static/1451336820090296572522/

 

3、App Store 显示 XCode 已安装的问题

步骤2执行后,App Store 的更新中是看不到 XCode, 但是打开 XCode 会提醒已安装,见鬼了。

通过查找及分析,发现是因为 App Store 其实是给的你 Install Xcode, 我之前装的 Xcode 4.1 的安装文件还是在本子上,把这个安装文件删除,重新打开 App Store就可以下载 XCode 4.2 了。

你可以通过搜索找到之前 XCode 的安装文件是放在那个目录下了。

 

 

参看:

一波三折的装上了xcode4.1 
http://www.douban.com/group/topic/21353623/

 

 

上面三个步骤完成后,重新打开App Store 就可以下载 XCode 4.2 了。

//----

http://qing.weibo.com/1400770593/537e10213300063c.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值