Installing Xcode on a 256GB MacBook is a storage disaster: the app itself starts at 40GB, and with simulator runtimes and DerivedData caches, blowing past 60GB is normal. Here's a complete moving route verified on real machines.
Option one: move everything + symlink (recommended)
Use Suishouqian to move `/Applications/Xcode.app` wholesale to the external drive: it leaves a symlink in the app's old spot, and Spotlight, double-clicking, and `xcode-select` all behave as if nothing happened. It backs up automatically before migrating and rolls back on failure.
One thing you must check afterward: confirm the path reported by `xcode-select -p` is still valid (symlinks are resolved correctly, so usually nothing is needed; if it errors, just re-point it with `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`).
Option two: relocate the caches (fixes the biggest chunk)
Xcode's biggest space sink is actually its cache directories — the move there is not relocation but re-pathing:
- DerivedData (build intermediates): Xcode → Settings → Locations → Custom, point it at the external drive
- Simulator runtimes: Settings → Platforms, where you can delete old runtimes — 5-8GB each
- Archives: the path can also be changed under Xcode → Locations
Handle those three and you'll typically reclaim 15-30GB on the internal disk immediately.
Three pitfalls
1. The external drive must be APFS or Mac OS Extended — exFAT doesn't support symlinks, and Xcode breaks the moment it lands there (Suishouqian hard-blocks the move and warns you beforehand)
2. The external drive must be connected when debugging on a device — unplug it and Xcode plus connected-device debugging stop working; plug it back in and everything recovers
3. Major version updates: if the App Store reports "unable to write" while updating Xcode, first confirm the drive is online and has enough free space
The one-line summary
Move the app itself with Suishouqian, re-path the caches in Settings, format the external drive as APFS — three steps later, your 60GB Xcode occupies nothing more than a symlink on the internal disk.