How to Completely Uninstall Xcode and Clear All Settings

How do I completely remove all Xcode program and cache files?

The problems you talk seem originated by Swift version.

To answer to your question, when you download a new Xcode App (and yes, you can have more than one Xcode app in the same computer) everything is inside the huge app.

All the local data are inside the folder

~/Library/Developer/Xcode/

Where you can find several folders with lot of data. If you have problems with Ide size you could check the "IDEPreferencesController.xcuserstate" that is found inside UserData folder.

How to completely remove Xcode 9 beta after installing released Xcode 9?

Just drag the Xcode-Beta app from /Applications to the trash bin as when deleting other files or apps. It will not affect your projects.

How can I actually uninstall Xcode?

Finally found the solution to reinstalling XCode. Although I had deleted it from my primary Applications folder, I had a secondary System installed on an external drive, and XCode was present there. Removing it from the Applications folder on THAT drive - even though I was not booted from it - allowed me to reinstall XCode from the app store.

Delete Xcode and download again instead of making update?

Yes, you can remove the current Xcode and install a new version from Mac App Store. However, you will probably encounter the same error for insufficient disk space, as it requires more than 40GB free space to expand and install Xcode.

To solve your problem, you can download Xcode from Apple Developer Portal and extract the XIP file in an external drive (of course you still need sufficient space). Then, move the extracted Xcode app back to your Mac's Applications folder.

Also, before you try the method above, you can use a software called DevCleaner, which can clean the unused simulator files, logs and derived data in your Mac.

Last, if you are brave enough, you can use this script to wipe clean your Xcode traces in your Mac (I personally use this to free up spaces when installing a new version):

killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
sudo rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Preferences/com.apple.dt.xcodebuild.plist
sudo rm -rf /Library/Preferences/com.apple.dt.Xcode.plist
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.bom
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.plist
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeSystemResources.bom
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeSystemResources.plist
sudo rm -rf /private/var/db/receipts/com.apple.pkg.Xcode.bom

save the file as uninstall_xcode.sh and run it from Terminal. Admin rights required.



Related Topics



Leave a reply



Submit