1.根目录下的必须要用管理员权限:
sudo rm -rf /Applications/Xcode.app
sudo rm -rf /Library/Preferences/com.apple.dt.Xcode.plist
2.然后删除自己目录下的:
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Application\ Support/Xcode(即Application Support)
3.以及和开发者相关的:
默认Xcode是安装在磁盘的根目录上,目录名:Developer
rm -rf ~/Library/Developer/Xcode
rm -rf ~/Library/Developer/CoreSimulator
rm -rf ~/Library/Developer/XCPGDevices
rm -rf ~/Library/Developer(也可以只用这条命令,即Developer全部删除)
4.xcode缓存目录
rm -rf ~/Library/Developer/Xcode/DerivedData
5.Xcode余下的一些旧标记 Development Tools
sudo /Developer/Library/uninstall-devtools –mode=all
6.下载新的Xcode
https://developer.apple.com/download/more/
网友评论