Dragging Xcode to the Trash frees about 10 GB and leaves the rest: simulators, simulator runtimes, build products and device symbols that often weigh three or four times the app. This guide removes all of it, step by step, and says what to keep if you still build for Apple platforms. If you only want Xcode smaller, not gone, read Xcode using too much space instead.
Before you start: check whether you need the Command Line Tools (git, clang, make), which Homebrew and most developer tools use. You can remove Xcode and keep them; that is the most common setup for a Mac that no longer builds iOS apps.
1. Delete simulator runtimes while Xcode is still there
Simulator runtimes are 5 to 8 GB each and live outside Xcode, in a system location. Remove them with simctl first, because it ships with Xcode:
xcrun simctl runtime list
xcrun simctl runtime delete <runtime identifier>
Then remove the simulators themselves:
xcrun simctl shutdown all
xcrun simctl delete all
2. Remove Xcode.app
Quit Xcode, then move /Applications/Xcode.app to the Trash in Finder (you may be asked for your password). If you installed it from the App Store, deleting it from Launchpad works too. Beta versions are separate apps, such as Xcode-beta.app.
3. Remove what Xcode left in your Library
Almost everything else is in ~/Library/Developer. See the sizes first:
du -sh ~/Library/Developer/* 2>/dev/null | sort -h
Xcode/DerivedData: build products and indexes, safe to delete.CoreSimulator: simulator devices and their data; empty after step 1, delete the rest.XCTestDevices: simulator clones of parallel tests.Xcode/Archives: your.xcarchivebuilds with the dSYM files needed to read crash reports. Keep the archives of app versions still in users’ hands, or copy them elsewhere.Xcode/iOS DeviceSupport(and thewatchOSandtvOSones): debug symbols of your devices’ OS versions.
When nothing in it is left to keep:
mv ~/Library/Developer ~/.Trash/
Moving it to the Trash keeps a way back until you empty it. A few more traces, all small:
ls -d ~/Library/Caches/com.apple.dt.Xcode ~/Library/Preferences/com.apple.dt.Xcode.plist \
~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState 2>/dev/null
Move the ones that exist to the Trash too. Removing com.apple.dt.Xcode.plist resets Xcode’s settings and accounts if you install it again.
4. Remove or reset the Command Line Tools
First see what xcode-select points to:
xcode-select -p
If it still says /Applications/Xcode.app/Contents/Developer, point it back to the Command Line Tools, or tools like git complain about a missing developer directory:
sudo xcode-select --reset
To remove the Command Line Tools as well (about 2 to 5 GB):
sudo rm -r /Library/Developer/CommandLineTools
sudo xcode-select --reset
There is no uninstaller; deleting the folder is Apple’s documented way. After that, git and clang ask you to install the tools again the first time you use them. Homebrew needs them, so keep them if you use brew.
5. Check what is left
du -sh ~/Library/Developer /Library/Developer 2>/dev/null
pkgutil --pkgs | grep -i CLTools
The pkgutil lines are receipts, a few KB of records that macOS keeps; you can leave them. If a size is still large, look in /Library/Developer/CoreSimulator, where older runtimes downloaded before Xcode 14 may remain; delete them as in step 1 or move the folder to the Trash.
Install again, smaller
- Only the tools:
xcode-select --install. - Xcode: from the App Store or the Apple Developer site. In Xcode › Settings › Components, download only the platforms and simulator runtimes you build for.
How CleanMate does it
CleanMate 1.12 for Mac (all macOS features) helps with the parts above that are files:
- The Uninstaller removes Xcode together with the data it owns in your Library, moved to the Trash with Undo; for an Xcode the App Store installed, macOS asks for your administrator password. How it matches an app’s data, and what it leaves alone: uninstall apps completely.
- With several Xcode versions installed, Smart Scan lists the old ones (15 to 30 GB each), never the one
xcode-selectpoints to or the newest release, not ticked. - Smart Scan also lists the developer junk Xcode leaves if you keep it: DerivedData per project, simulator data and test device clones, old simulator runtimes, old archives, device support per OS version, the documentation cache and device logs, each with its size.
It does not remove the Command Line Tools or change xcode-select: do those with the commands in step 4.
FAQ
Will removing Xcode break Homebrew or git? Not if you keep the Command Line Tools and run sudo xcode-select --reset so they are used again.
Can I delete /Library/Developer/CommandLineTools while Xcode is installed? Yes. Xcode carries its own copy of the tools; xcode-select -p shows which copy is in use.
Do I lose my signing certificates? No. They are in your keychain, not in Xcode’s folders. Your projects are untouched too.

