How to free up disk space on a Mac used for development
Open the notch, choose Disk, and press Scan on the Overview. It looks for four groups of reclaimable space: app caches, logs, Xcode build data and old downloads. You choose which groups to clean, and the files move to the Trash. Nothing is removed until you press the button.
Steps
- Open the notch and choose Disk. The Overview shows free space for each drive, with an eject button for external ones.
- In the cleanup column, press Scan. It says it scans caches, logs, Xcode data and old downloads.
- Review the groups and their sizes:
- App caches, which apps rebuild when needed.
- Logs, diagnostic logs in your Library.
- Xcode build data, which covers DerivedData and device support.
- Old downloads, untouched for 90 or more days.
- Tap a group to select it. The button shows the total, for example “Move 8 GB to Trash”.
- Press it. Open the Trash and look before you empty it.
- The first build after clearing DerivedData is slower, because Xcode rebuilds what it deleted.
What to expect
Xcode build data is often the biggest group on a development Mac, and it is regenerated, so it is the safest large item. Device support files are rebuilt when you next connect a device, which may take a while. Old downloads deserve a look first, since a download can be something you still need.
Other sections worth a look
The Space section ranks your home folder by size, so you can find a forgotten project or a dataset. Duplicates finds identical files across common folders. Apps lists apps with the caches and preferences they leave, and removes them fully, but never Apple apps or NotchStar. The finding large folders page walks through them.
Limits
- Only the named groups. The Xcode group covers DerivedData and device support. Other Xcode data, such as simulators and archives, is not named, so look in Space for those.
- Only your home folder and /Applications. System locations are refused.
- Package manager caches and Docker images are outside what the cleanup groups name, so check Space for them.
- Running apps show Running in Apps instead of a Remove button.
- Space recovered counts only after the move. The Trash still holds the files until you empty it.
- macOS may ask for access to Documents, Desktop or Downloads on first scan.
Keep the System tab in mind to watch free space. The Disk page lists every rule.