How to Completely Uninstall Xcode and Clear All Settings
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Completely uninstalling Xcode means removing more than the application bundle in /Applications. Xcode also leaves behind derived data, simulator content, archives, user preferences, and sometimes standalone command line tools, so a real reset requires clearing those locations deliberately.
Remove the Xcode Application Bundle
If Xcode was installed in the normal location, start by deleting the main app bundle.
That frees the largest single chunk of disk space, but it does not remove your build caches, simulator data, or settings. If you skip the remaining cleanup, a new installation may still inherit old state.
Remove Developer Caches and Build Data
Xcode stores a large amount of per-user data under your home directory. The most common reset targets are DerivedData, Archives, and device support files.
These directories often consume many gigabytes. Removing them is also useful when the goal is not just uninstalling Xcode, but fixing corrupted indexing, stale builds, or odd debugger behavior.
If you want a truly clean slate, also remove simulators and related developer content:
Be aware that this deletes installed simulators and their app data.
Clear Preferences and User-Specific Settings
Xcode writes preference files and state under the Library directory in your home folder. To clear editor settings, window layouts, and saved state, remove the relevant preference files.
This is the part that resets Xcode's local behavior, not just its binaries. If the issue is a broken preference, deleting only the app bundle will not help.
Reset Command Line Tools if Needed
Some systems also have separate command line developer tools installed outside the Xcode app bundle. If you want to remove those too, inspect the active developer directory first:
If it points into Xcode, deleting the app bundle may leave xcode-select pointing at a path that no longer exists. Reset it or switch it.
If standalone command line tools were installed, they are often located under /Library/Developer/CommandLineTools. Removing them looks like this:
That step is optional if your goal is only to reinstall the Xcode app, but it matters if you want a full developer-tool reset.
Verify the Machine Is Clean
After removal, check the obvious locations.
You should no longer see Xcode.app, and xcode-select should either be reset or point somewhere intentional. If you plan to reinstall, a clean verification step saves time because it separates a bad reinstall from leftover state you forgot to remove.
Reinstall With Intention
If the goal is a fresh working setup, reinstall Xcode from the App Store or another approved distribution method and then launch it once to let it install required components. After that, re-add only the simulators and settings you actually need rather than copying old state back into place.
A clean reinstall is especially useful when troubleshooting:
- corrupted DerivedData
- broken simulator runtimes
- invalid command line tool paths
- stale signing or indexing state
The less old state you carry over, the easier it is to tell whether the problem is actually fixed.
Common Pitfalls
- Deleting only
/Applications/Xcode.appdoes not remove caches, preferences, or simulator data, so the system is not truly reset. - Removing
~/Library/Developer/CoreSimulatorwithout realizing it deletes simulator devices and app data can wipe useful test state unexpectedly. - Forgetting to run
xcode-select --resetmay leave developer tools pointing at a deleted Xcode path. - Using broad
rm -rfcommands without checking the exact path is dangerous. Verify each location before running it withsudo. - Assuming a reinstall will fix preference corruption while leaving old
plistfiles and caches in place often leads to the same broken behavior returning immediately.
Summary
- A complete Xcode uninstall includes the app bundle, caches, DerivedData, archives, simulator state, and preferences.
- Remove
/Applications/Xcode.appfirst, then clear user-level developer directories. - Reset or remove command line tools if you want a full development-tool cleanup.
- Verify the active developer path after uninstalling so
xcode-selectis not left broken. - Reinstall from a clean state to avoid carrying corrupted configuration back into the new setup.

