-
-
Save rosuH/7994876dfbbde1b39bcc56fc60b29bdc to your computer and use it in GitHub Desktop.
xcode-uninstall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
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 | |
# https://medium.com/@onexlab.io/uninstall-xcode-from-macos-eca1b69dc836 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lets see if this fixes the issue on macOS Ventura that software updater kept insisting to update to 2 Command Line Tools for Xcode versions at the same time:
After running the above steps (and removing /Library/Developer/CommandLineTools) it has stopped showing up in the System Settings. So that's good 👍
Edit: After
xcode-select --install
('Install Command Line Developer Tools') has runsoftwareupdate --list
now shows "No new software available." 😊