How to uninstall Xcode on Mac completely

Deleting Xcode from Applications frees only part of the space it takes. Simulator runtimes, build files, simulated devices and debug files for your iPhone stay behind, often tens of gigabytes. Here is how to remove them too — and what to keep if you ship apps.

Uninstaller: a list of apps sorted by size with when each was last opened, Google Chrome selected with its app and cache sizes
  1. Open MacWashing and choose Uninstaller in the sidebar.
  2. Click Show Apps and check Xcode in the list.
  3. Click Remove and confirm. Files that may be yours are listed as Possible and stay unchecked.

Free trial · macOS 14 or later

Remove simulator runtimes first

Simulator runtimes and other optional components are big and are not inside the Xcode app. Remove them while Xcode is still installed:

  1. Open Xcode and choose Xcode › Settings, then click Components in the sidebar. Xcode shows how much space each component takes.
  2. Click the information button next to a simulator runtime or platform and click Delete.
  3. Repeat for the other components, then quit Xcode.

Delete Xcode in Finder

  1. Quit Xcode and the Simulator app if they are open.
  2. Open Finder › Applications and drag Xcode to the Trash.
  3. Enter your administrator password if macOS asks for it.

What Xcode leaves behind

Most of what remains is in the Developer folder of your Library. Check these places:

  • ~/Library/Developer/Xcode — usually the biggest: build files and indexes (DerivedData), debug files copied from your iPhone or iPad (iOS DeviceSupport), device logs and your archived builds (Archives).
  • ~/Library/Developer/CoreSimulator — simulated devices with the apps and data installed on them.
  • ~/Library/Developer/XCPGDevices — simulated devices used by playgrounds.
  • ~/Library/Preferences/xctest.plist — settings of the test runner.
  • ~/Library/Preferences/embeddedBinaryValidationUtility.plist — settings of a build tool.

If you publish apps, the Archives folder inside ~/Library/Developer/Xcode holds the builds you sent to the App Store or to testers, with their debug symbols. You may need them to read crash reports later: move that folder somewhere safe before deleting ~/Library/Developer/Xcode, or keep it.

Remove the leftovers by hand

  1. In Finder, choose Go › Go to Folder (Shift-Command-G), type a path from the list above and press Return.
  2. Move the folder or file to the Trash.
  3. Repeat for the other paths.
  4. Restart your Mac, then empty the Trash. Emptying it can take a while: these folders hold many small files.

Xcode isn’t the only app that leaves files behind: see how to uninstall apps on Mac completely.

Command Line Tools are separate

The Command Line Tools for Xcode are a separate package that commands like git use in Terminal. Deleting Xcode doesn’t remove them. If you don’t need them, Apple’s instructions are to run this command in Terminal and enter your administrator password:

sudo rm -rf /Library/Developer/CommandLineTools

Software Update keeps offering new versions of the package afterwards. To stop that, Apple says to also run sudo pkgutil --forget com.apple.dt.commandlinetools. Keep the package if you use developer tools in Terminal.

With MacWashing, it’s one click

Uninstaller: a list of apps sorted by size with when each was last opened, Google Chrome selected with its app and cache sizes

The Uninstaller in MacWashing knows the files Xcode creates in your Library folder and removes them together with the app. Your archives and Xcode settings are listed as Possible and stay unchecked until you check them yourself.

Free trial · macOS 14 or later

Questions and answers

Will MacWashing delete my own files when it removes Xcode?

No. The Uninstaller checks only what belongs to the app: its settings, caches, logs and background items. Folders that may hold your own files are listed as Possible and stay unchecked until you check them yourself, and apps go to the Trash by default, so you can put them back.

What if Xcode is still running?

MacWashing waits for it to quit, or quits it at your request, and only then removes its files.

Is it free to uninstall Xcode with MacWashing?

Yes, within the free trial: System Junk and the Uninstaller free up to 25 GB in total, with no account or card needed.

Will deleting Xcode delete my projects?

No. Your projects stay in the folders where you saved them. Only Xcode’s own build files and settings are removed.

Is it safe to delete DerivedData?

Yes. DerivedData holds build files and indexes that Xcode creates again the next time you build a project. The first build afterwards takes longer.

Can I reinstall Xcode later?

Yes. Xcode is free in the App Store. After reinstalling, download the simulator runtimes you need again in Xcode › Settings › Components.