Xcode is the single biggest space hog on the Mac, bar none: the app itself starts at 40G, and once you add simulator runtimes and build caches, 60G-plus is the norm. On a 256G MacBook, that's half your usable space. The good news is that the whole thing can move to an external drive, leaving nothing on your internal disk but a link. This article lays out two routes we've verified on real machines; you can stack them or just do one. Two things up front: this approach only touches the app bundle itself — the caches are handled by Route 2 — and when you format the external drive, choose encrypted APFS to protect your source code. Lose an unencrypted drive, and your code is public.
Do the Math First: How Much Space Does Xcode Really Take?
Open Finder and check the size of /Applications/Xcode.app — usually around 40G (for the download and a basic introduction, see Xcode in our app library). Then look at ~/Library/Developer: each iOS simulator runtime is 5-8G, and the DerivedData build cache is perennially over 10G. Add them up and 60-80G is nothing unusual.
That's before counting the temporary space an update needs: major App Store updates replace the entire bundle, so in theory you need nearly twice the space free — which is the real reason so many 256G users hit "update failed". Moving it out solves storage and updates in one go. Run the numbers in detail: a 256G MacBook has about 150G free once the system and your everyday apps are installed, and the Xcode family eats 60-80G of that — nearly half. Moving it out buys the machine a few more years.
Route 1: Move the Whole Bundle, Leave Only a Symlink (Recommended — Saves 40G Straight Away)
The idea is simple: copy the whole Xcode.app to the external drive and leave a symbolic link in its original place. Spotlight, double-clicking, and xcode-select all work as before; as far as the system and the App Store are concerned, "the app is still where it was".
- Get an external drive formatted as APFS (Disk Utility → Erase → choose APFS as the format). exFAT drives don't support symbolic links — do not use one.
- Quit Xcode completely (⌘+Q) and make sure nothing is building.
- In iTerm2 or Terminal, run
cp -R /Applications/Xcode.app /Volumes/YourDriveName/Applications/and wait 10-30 minutes depending on drive speed. - Once you've confirmed the two copies are the same size, move the original app to the Trash (don't empty it yet).
- Create the symlink:
ln -s /Volumes/YourDriveName/Applications/Xcode.app /Applications/Xcode.app. - Open Xcode, create a small project, and build it once; then run
xcode-select -pto confirm the path resolves correctly. - After a week of normal use, empty the Trash.
Don't let the Mac sleep or unplug the drive during the copy; if the drive is slow (a spinning HDD), wait it out patiently — an interrupted copy leaves the app corrupted. That's also why the order matters: copy, verify, then delete the original.
If you'd rather not type commands, steps 2-6 above can be done in one click with Suishouqian: it backs up before migrating, rolls back automatically on failure, and hard-blocks exFAT drives before anything moves — covering exactly the pitfalls that are easy to miss when you go manual.
Route 2: Redirect the Caches to Stop the Biggest Chunk from Growing (Another 15-30G Saved)
Xcode's caches shouldn't be moved — they should be redirected. They grow extremely fast and will keep eating your internal disk if left there:
- Xcode → Settings → Locations → DerivedData → Custom, and point it to the DerivedData folder on the external drive.
- On the same page, point Archives to the external drive too.
- Settings → Platforms: delete old simulator runtimes you no longer use — 5-8G each.
After these three changes, the internal disk usually gets 15-30G back immediately. Stacking both routes gives the biggest payoff.
Simulator and Device Debugging Caches
Beyond the two locations above, iOS developers have two more hidden heavyweights: ~/Library/Developer/CoreSimulator (simulator data) and the device support files used for on-device debugging. For simulators, download runtimes on demand inside Xcode. Device debugging caches can pile up over time; you can review them under Xcode → Settings → Locations and clear them carefully as needed.
If you only distribute and install test builds through TestFlight and never debug on a physical device, this pressure is far smaller. If you only ever install and never delete, simulator runtimes pile up version after version — 20G from this alone is not unusual. Make it a habit: after a major Xcode upgrade, delete the previous version's runtime.
Also, ~/Library/Developer/Xcode/iOS DeviceSupport accumulates device debugging caches by iOS version, 2-4G each — leave it alone long enough and it can eat over 10G. Once you're sure you no longer need an older iOS version, delete it by version.
The Same Works for Other Dev Tools
This "symlink migration" isn't Xcode-only: OrbStack's Docker data directory, Android Studio, and the Unity engine can all be handled the same way. Any app that's "big, rarely used, but can't be deleted" follows the same logic — which is exactly why tools like Suishouqian exist: they turn this manual procedure into a button so anyone can do it safely.
Three Pitfalls to Know Before You Start
1. exFAT drives break it outright: symbolic links don't work on exFAT, so Xcode moved there is simply broken. Use APFS, full stop — Suishouqian hard-blocks exFAT drives with a warning before migrating; if you're doing it by hand, this gate is yours to guard.
2. Xcode won't open once the drive is unplugged: the symlink points to a drive that isn't there, so the app is unavailable. Keep the external drive connected in day-to-day use; before a trip, bring the drive or move Xcode back temporarily.
3. Major updates need twice the space: the App Store replaces the entire Xcode bundle, so the external drive needs as much free space as Xcode itself takes, or the update will fail halfway. If you hit an error, check the drive's free space first before blaming the migration.
Updates and Rolling Back
With the symlink approach, App Store updates to Xcode work as usual — the update follows the link and writes to the external drive. If an update reports "unable to write", first confirm the drive is connected and has enough free space.
Moving back to the internal disk is simple too: delete the symlink and copy Xcode.app from the external drive back to /Applications/; alternatively, Suishouqian's "Drive Retirement" mode moves everything back in one click. For the detailed original steps, see our tips piece Move All of Xcode to an External Drive.
Will builds be slower from an external drive? On an SSD over USB 3.2 or Thunderbolt, build speed is practically indistinguishable from the internal disk; ordinary flash drives and spinning HDDs are noticeably slower and not recommended for running Xcode.
Do major macOS upgrades affect this? Generally not the symlink itself; the first time you open Xcode after upgrading, it will rebuild some components — just confirm xcode-select -p still points to the right place.
Wrapping Up
Remember three things: move the whole bundle, redirect the caches, use APFS on the external drive. Do those and a 60G Xcode takes up nothing on your internal disk but a link, with updates and everyday use exactly as before. The 40G you free up is enough for a photo library twice the size of your current one.