BLACK FRIDAY$9.99$29with code BLACKFRIDAY · ends in--Get Pro →

How to uninstall Xcode on Mac completely

Dragging Xcode to the Trash leaves its data behind. Here’s every place it keeps files, which ones matter, and how to remove the rest.

Short answer

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.

Skip the manual steps. Tidy Mac finds this and every other hidden space hog on your Mac in under a minute.
Before you start. Archives contain the debug symbols (dSYMs) you need to read crash reports from apps you shipped. Keep the ones for versions still in use. UserData holds your key bindings, code snippets and themes.

Uninstall Xcode step by step

  1. List simulator runtimes with xcrun simctl runtime list, and remove each with xcrun simctl runtime delete followed by its identifier.
  2. Copy anything you want to keep from ~/Library/Developer/Xcode/Archives and ~/Library/Developer/Xcode/UserData.
  3. Quit Xcode and Simulator.
  4. Drag Xcode from Applications to the Trash.
  5. Move ~/Library/Developer/Xcode and ~/Library/Developer/CoreSimulator to the Trash.
  6. Move ~/Library/Caches/com.apple.dt.Xcode and ~/Library/Preferences/com.apple.dt.Xcode.plist to the Trash.
  7. Empty the Trash.

Where Xcode leaves files

LocationWhat it isAfter uninstalling
~/Library/Developer/Xcode/DerivedDataBuild files for every project you builtSafe
~/Library/Developer/Xcode/iOS DeviceSupportDebug symbols copied from each device you connectedSafe
~/Library/Developer/Xcode/ArchivesArchived builds with dSYMs for crash reportsCheck first
~/Library/Developer/Xcode/UserDataYour key bindings, code snippets and themesCheck first
~/Library/Developer/CoreSimulatorSimulator devices and their dataCheck first
~/Library/Caches/com.apple.dt.XcodeCacheSafe
~/Library/Preferences/com.apple.dt.Xcode.plistPreferencesSafe

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/null

Delete 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 unavailable

More about simulators

DerivedData 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.

With Tidy Mac

Tidy Mac doesn’t uninstall Apple apps, Xcode included, so follow the steps above. Its Clean screen does cover the space Xcode leaves around: DerivedData and simulator caches are Safe to clear, device support is Worth a look, and archives and simulator devices are Kept for you to handle. Whatever Tidy Mac removes goes to the Trash first, with Undo in History.

Uninstall apps and their leftovers in one step

See every part of your storage explained, and clear junk to the Trash with Undo. $9.99 $29 once, 2 Macs.

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 Tidy Mac) 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.

Keep reading