Delete simulator runtimes first with xcrun simctl runtime delete, while Xcode is still installed. Then drag Xcode from Applications to the Trash and remove ~/Library/Developer/Xcode (DerivedData, iOS DeviceSupport, Archives), ~/Library/Developer/CoreSimulator, ~/Library/Caches/com.apple.dt.Xcode and its preferences. Check Archives before deleting; they hold the symbols for your shipped apps.
Uninstall Xcode step by step
- List simulator runtimes with xcrun simctl runtime list, and remove each with xcrun simctl runtime delete followed by its identifier.
- Copy anything you want to keep from ~/Library/Developer/Xcode/Archives and ~/Library/Developer/Xcode/UserData.
- Quit Xcode and Simulator.
- Drag Xcode from Applications to the Trash.
- Move ~/Library/Developer/Xcode and ~/Library/Developer/CoreSimulator to the Trash.
- Move ~/Library/Caches/com.apple.dt.Xcode and ~/Library/Preferences/com.apple.dt.Xcode.plist to the Trash.
- Empty the Trash.
Where Xcode leaves files
| Location | What it is | After uninstalling |
|---|---|---|
| ~/Library/Developer/Xcode/DerivedData | Build files for every project you built | Safe |
| ~/Library/Developer/Xcode/iOS DeviceSupport | Debug symbols copied from each device you connected | Safe |
| ~/Library/Developer/Xcode/Archives | Archived builds with dSYMs for crash reports | Check first |
| ~/Library/Developer/Xcode/UserData | Your key bindings, code snippets and themes | Check first |
| ~/Library/Developer/CoreSimulator | Simulator devices and their data | Check first |
| ~/Library/Caches/com.apple.dt.Xcode | Cache | Safe |
| ~/Library/Preferences/com.apple.dt.Xcode.plist | Preferences | Safe |
In Finder choose Go › Go to Folder (Shift-Command-G) and paste a path to open it. Safe means nothing you made is inside; Check first means it may hold the only copy of something. To see how much space they use, run this read-only command in Terminal:
du -sh ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/iOS\ DeviceSupport ~/Library/Developer/Xcode/Archives ~/Library/Developer/Xcode/UserData ~/Library/Developer/CoreSimulator ~/Library/Caches/com.apple.dt.Xcode ~/Library/Preferences/com.apple.dt.Xcode.plist 2>/dev/nullDelete simulator runtimes before Xcode
Recent versions of Xcode store simulator runtimes as separate disk images managed by xcrun simctl. Once Xcode is gone, the easy way to remove them goes with it. Remove them first:
xcrun simctl runtime list
xcrun simctl runtime delete <identifier>
xcrun simctl delete unavailableDerivedData and DeviceSupport are pure cache
Both are rebuilt when needed. If you’re keeping Xcode and just want space, these two are the safest wins. DerivedData · iOS DeviceSupport
Keep the Command Line Tools if you use them
/Library/Developer/CommandLineTools is a separate install that provides git, clang and make without Xcode. Homebrew and many developer tools need it, so leave it unless you’re sure.
Uninstall Xcode with TidyMac
TidyMac’s uninstaller lists every app with its size and last use, and finds the leftovers that belong to it by bundle ID. Remove Xcode and its leftovers in one review: everything goes to the Trash first, you confirm twice, TidyMac checks the disk afterwards, and you can put anything back. Leftovers from apps you already deleted are found too, labelled Check first.
Uninstall apps and their leftovers in one step
See every part of your storage explained, and clean only what’s safe after you confirm twice. $9.99, one time.
Frequently asked questions
Does dragging Xcode to the Trash uninstall it completely?
No. It removes the app, but Xcode leaves 7 kinds of files behind in your Library and elsewhere: build files for every project you built; debug symbols copied from each device you connected; archived builds with dsyms for crash reports. The steps above remove them.
What is Xcode’s bundle ID on Mac?
com.apple.dt.Xcode. Most of its leftover files and folders are named after it, which is how you (and TidyMac) can tell they belong to Xcode.
Can I reinstall Xcode later?
Yes. Download it again from Apple. Anything stored in your account online comes back when you sign in; local-only data you removed does not.