# Docker and Xcode taking up space on Mac? Here's what to clear

> Docker and Xcode taking too much space on your Mac? Shrink Docker's disk image, prune images, and clear Xcode's DerivedData, simulators and device support.

Source: https://macblaze.space/guides/docker-xcode-taking-up-space-mac (updated 2026-11-29)

Docker and Xcode are two of the biggest space users on a developer's Mac. For Docker, prune unused images and, if needed, lower or move its disk image. For Xcode, clear DerivedData, remove simulator runtimes you don't use, and move old archives off the Mac.

## Docker Desktop

Docker Desktop stores Linux containers and images in a single large disk image file. Docker's own notes:

- **Check the real size.** Docker Desktop's settings show the disk image's location, its maximum size and the space it actually uses. Docker says other tools often show the maximum, which looks alarming.
- **Remove what you don't use.** Run `docker system df` to see where space goes, then `docker system prune` to remove unused containers, networks and images. Docker says space is only freed when images are deleted, not when files are deleted inside a running container, and it can take a few minutes to show on the Mac.
- **Lower the maximum size.** The disk image size slider in settings sets a lower limit. Docker warns that reducing it deletes the current disk image, so every container and image is lost. Push anything you need first.
- **Move it.** You can choose a new disk image location, for example an external SSD.

## Xcode

Xcode keeps several large folders in ~/Library/Developer. In Finder, press **Command-Shift-G** and paste the path to look.

| Folder | What it is | Safe to clear? |
|---|---|---|
| Xcode/DerivedData | Build products and indexes | Yes. Xcode rebuilds it. |
| Simulator runtimes | iOS, watchOS, tvOS and visionOS simulators | Yes for versions you don't test on. Remove them in Xcode's settings. |
| Xcode/iOS DeviceSupport | Debug files for each device and iOS version you've connected | Old versions, yes. They come back when you connect that device. |
| Xcode/Archives | Builds you've shipped, with their debug symbols | Keep what you might need to read crash reports. Move old ones off the Mac. |

Quit Xcode before deleting anything, and expect the next build to be slower while DerivedData rebuilds.

## Keep the rest in the cloud

Old archives, VM images, datasets and finished projects don't need to sit on your Mac. MacBlaze puts Google Drive, Dropbox and OneDrive in Finder as one drive, so you can move them there and still find them in Finder and Spotlight. Things that run or change constantly, like Docker's disk image, active repos and DerivedData, belong on a local disk.

MacBlaze also scans your Mac to show which folders take the most room, and moves the ones you pick to your cloud with an undo for every move.

## Questions

### Why is Docker taking up so much space on my Mac?
Docker Desktop keeps every image and container in one large disk image file. Docker notes that many tools show the file's maximum size rather than the space it actually uses, so check the real figure in Docker Desktop's settings.

### How do I free space from Docker on a Mac?
Run docker system df to see usage, then docker system prune to remove unused containers, networks and images. Docker says space is only freed when images are deleted, and it can take a few minutes to show on the Mac.

### Can I move Docker's disk image to an external drive?
Yes. Docker Desktop's settings let you choose a new disk image location. Use a fast local disk, since containers read and write it constantly.

### Is it safe to delete Xcode DerivedData?
Yes. DerivedData holds build products and indexes that Xcode recreates. Your next build takes longer while it rebuilds.

### Should I delete Xcode Archives?
Only the ones you don't need. Archives hold the builds you shipped along with their debug symbols, which you need to read crash reports from those versions. Move old ones to cloud storage instead of deleting them.

## Related
- [Ollama models location on Mac](https://macblaze.space/guides/ai-models-storage-mac)
- [MacBlaze for developers](https://macblaze.space/for/developers)
- [What is System Data on Mac?](https://macblaze.space/guides/system-data-mac)
