How to fully remove Xcode 4

前端 未结 7 2022
孤街浪徒
孤街浪徒 2020-11-28 02:32

I want to remove all existing SDK versions as well as Xcode 4.

Xcode 4 Guide says to do this:

sudo /Xcode4/Library/uninstall-devtools --mode=all
         


        
7条回答
  •  醉话见心
    2020-11-28 02:48

    I tried to uninstall this by deleting it, but the AppStore still thought that it was installed. I deleted some preferences files in my /private directory, which made the AppStore "forget" that I had installed Xcode. I used the following command:

    sudo find / -iname '*xcode*' 2> /dev/null | egrep '^/private.*' | xargs -I file sudo rm -rfv file
    

    Which deleted the following files from my computer:

    /private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.bom
    /private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.plist
    /private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-Xcode
    /private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-xcodebuild
    /private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503
    

    I do not know what these files are used for, but it made the AppStore forget that it was installed, which is what I needed to happen. In my case, the AppStore was not allowing me to update to the new version of Xcode.

提交回复
热议问题