# Uninstall Xcode on Mac and Keep the Tools You Need

> Remove Xcode while keeping needed archives and signing assets, then check Command Line Tools, simulator storage and your remaining Homebrew builds.

Published: 2026-07-02 | Updated: 2026-10-31

To uninstall Xcode, first decide whether you are leaving Apple development or just removing the large editor. The Xcode app, separately installed Command Line Tools, simulator runtimes and your release archives are different things. Removing them all together can break a working build setup or discard symbols you still need.

## Decide What Must Stay

Apple's [Command Line Tools documentation](https://developer.apple.com/documentation/xcode/installing-the-command-line-tools) distinguishes the standalone package from tools inside Xcode. Keep the standalone tools if your remaining work needs them; they do not provide every Xcode command.

| Item | Decision before removal | Recovery |
| --- | --- | --- |
| Xcode.app | Keep another required Xcode version | Restore from Trash or reinstall a compatible version |
| Standalone Command Line Tools | Check remaining command-line build needs | Install a compatible package again |
| Simulator devices and runtimes | Preserve test data and required OS coverage | Download runtimes again; erased device state needs a backup |
| DerivedData and caches | Check that source and dependencies remain available | Rebuild and index again |
| Archives and signing assets | Keep distributed builds and needed signing material | Restore a verified backup, not a fresh build |

If the goal is only space, start with [cleaning Xcode storage](https://mole.fit/blog/how-to-clean-up-xcode-mac). That guide covers selective cache cleanup without uninstalling the editor.

## Preserve Archives and Signing Data

Before removing Xcode, inspect its archives in Organizer and copy the builds you need to independent storage. Apple's [archive guide](https://help.apple.com/xcode/mac/current/en.lproj/devf37a1db04.html) identifies archives as builds for distribution. The usual [Archives location](https://help.apple.com/xcode/mac/current/en.lproj/deva52afe8a4.html) is also the folder Mole explicitly excludes from cache cleanup:

```text
~/Library/Developer/Xcode/Archives
```

Keep the archive for a shipped build, including its matching dSYMs. Apple explains in [debugging information for distributed apps](https://developer.apple.com/documentation/xcode/building-your-app-to-include-debugging-information) that binaries and dSYMs must have matching build UUIDs, so rebuilding the source is not a replacement for those symbols.

Preserve provisioning profiles and signing identities you still use. Apple's [signing-asset backup guidance](https://help.apple.com/xcode/mac/current/en.lproj/dev8a2822e0b.html) notes that downloading profiles does not restore a missing signing private key. Do not turn an app uninstall into a Keychain or signing-data purge.

## Remove the Xcode App First

Finish builds and tests, quit Xcode and Simulator, then find the particular Xcode app you mean to remove. Apple's [Finder removal procedure](https://support.apple.com/en-us/102610) is to move the app to the Trash. Check the actual installation, especially if multiple Xcode versions are present, instead of deleting every similarly named app.

Keep the app in the Trash until you have checked the tools you intend to retain. Restoring it is possible only while it remains there; a later reinstall needs a compatible version and an available download. Storage is released only after permanent removal, so do not mistake an unchanged free-space reading for a failed move.

## Keep or Remove Command Line Tools Separately

Apple's [developer-directory instructions](https://developer.apple.com/documentation/xcode/configuring-command-line-tools-settings) document this read-only check:

```sh
xcode-select --print-path
```

An Xcode developer path means command-line tools are selected from that app. `/Library/Developer/CommandLineTools` means the standalone package is selected. An error means there is no active developer directory, not that your source projects disappeared.

If you need the standalone package and it is absent, request its installer with `xcode-select --install` and finish installation first. Only after that directory exists, select it:

```sh
sudo xcode-select --switch /Library/Developer/CommandLineTools
xcode-select --print-path
```

The second command should print the standalone path. To reverse the selection later, choose a real, retained Xcode installation using Apple's same selection procedure. A path switch does not install missing tools.

If no remaining workflow needs the standalone package, Apple documents removing `/Library/Developer/CommandLineTools` in its installation guide. Follow that exact package-specific procedure only after deciding to lose those tools; it is a direct deletion, not a Trash operation. Leave the broader `/Library/Developer` directory alone.

## Review Simulators and Caches as Separate Jobs

Before removing your last Xcode, use Apple's [component management](https://developer.apple.com/documentation/xcode/downloading-and-installing-additional-xcode-components) to review unwanted runtimes. Current documentation calls this settings pane **Components**. A runtime and the virtual devices using it need separate decisions, detailed in [iOS simulator cleanup](https://mole.fit/blog/how-to-clean-up-ios-simulator-mac).

For DerivedData and caches, use the Xcode storage guide linked above and target only identified output. Regeneration requires source, dependencies and the necessary toolchain. Leave Archives and provisioning data outside that cleanup, and do not delete the whole Developer tree to finish an uninstall.

## Check Homebrew and Remaining Builds

Homebrew's [installation requirements](https://docs.brew.sh/Installation) list Command Line Tools or Xcode for building formulae from source. Keeping the standalone package can therefore matter even when you no longer open Xcode. It does not replace full Xcode for workflows requiring Xcode-only tools such as `xcodebuild`.

Check the selected developer directory, then try a representative build you still need. If it fails, read the error before reinstalling or deleting anything else, distinguishing missing tools from missing project dependencies. Keep the removed app recoverable until that check passes.

## Where Mole Fits

Mole Mac's **Software** view permits Xcode removal and shows a data-review advisory for it. This is a reminder to inspect the selected data, not a claim that every associated folder is disposable.

For **Clean**, Mole excludes Xcode Archives from its developer cache catalog and includes the Archives path in its built-in whitelist. That safeguard is not a backup of your builds or signing assets; preserve those separately before an uninstall.

## FAQ

### Can I Remove Xcode and Keep Homebrew?

Yes, but retain or install compatible Command Line Tools when your Homebrew builds need them, then check the selected developer directory and a build you actually use.

### Does Removing Xcode.app Remove All Simulators?

Do not assume it does. Review downloaded runtimes and device data separately using the component and simulator guides before removing the last Xcode installation.

### Can I Delete Archives Because I Still Have the Source?

Keep archives and matching symbols for distributed builds. A rebuild is not guaranteed to produce the same UUIDs, and reinstalling Xcode cannot restore your old signing private keys.

---

Canonical HTML page: https://mole.fit/blog/how-to-uninstall-xcode-mac
Blog index for agents: https://mole.fit/blog/llms.txt
Site index for agents: https://mole.fit/llms.txt
