CloudRoomy Download

Guides

How to clear developer caches on a Mac

Developer tools are some of the biggest users of space on a Mac, and most of it is rebuilt for free. Here is where each tool keeps its files, what is safe to delete, and the command that does it properly.

By the CloudRoomy team · Updated

The safe way to clear developer caches on a Mac is to use each tool's own clean-up command, with the tool quit. Xcode DerivedData, iOS DeviceSupport for old iOS versions, Homebrew downloads, and npm, Yarn, pnpm, pip and conda caches can all be deleted and are rebuilt when needed. Simulators, Docker and archives need more care: remove them through Xcode, simctl and Docker's own commands, never by dragging their folders to the Trash.

The table below lists every place, then each tool gets its own short section. Measure first, delete second.

We make CloudRoomy. It finds most of these for you, and we say how near the end. Every path and command below comes from the tool's own documentation or Apple's developer forums, linked at the bottom, and was checked on 17 November 2026. Sizes vary a lot from Mac to Mac, so measure yours with du -sh.

Developer caches at a glance

WhatWhereHow big it getsSafe to delete?Command or place
Xcode DerivedData~/Library/Developer/Xcode/DerivedDataGrows with every project you buildYes, rebuiltQuit Xcode, then rm -rf ~/Library/Developer/Xcode/DerivedData/*
iOS DeviceSupport~/Library/Developer/Xcode/iOS DeviceSupportOne folder per iOS version you've debugged onYes, for versions you no longer useDelete old version folders in Finder
Xcode Archives~/Library/Developer/Xcode/ArchivesOne per build you archivedOnly for builds you'll never need to debugXcode's Organizer window
Simulator runtimesManaged by XcodeSeveral GB eachYes, ones you don't test onXcode › Settings › Components
Simulator devices~/Library/Developer/CoreSimulator/DevicesGrows with apps and data on each oneUnavailable ones, yesxcrun simctl delete unavailable
Homebrew downloadsbrew --cache shows itOld bottles and installers pile upYesbrew cleanup
npm cache~/.npmEvery package you ever installedYesnpm cache clean --force
Yarn cacheyarn cache dir shows itEvery package you ever installedYesyarn cache clean
pnpm storepnpm store path shows itShared by all projectsUnused packages, yespnpm store prune
node_modulesInside each projectOne full copy of the dependencies in every projectYes, in projects you aren't working onDelete the folder; reinstall later
Docker DesktopOne disk image fileUp to the limit you setUnused images, containers and build cache, yesdocker system prune
pip cache~/Library/Caches/pipWheels you've downloadedYespython3 -m pip cache purge
conda packagesconda's pkgs folderEvery package version downloadedUnused ones, yesconda clean --all
Gradle caches~/.gradle/cachesDependencies and build cachesYes, with no build runninggradle --stop, then delete
Android emulators~/.android/avdVery large disk imagesOnes you don't use, yesAndroid Studio Device Manager

Save or screenshot this table. Before deleting anything, see how big it is: du -sh ~/Library/Developer/* or du -sh ~/.npm ~/.gradle.

Xcode

Quit Xcode before you delete anything in ~/Library/Developer. An Apple engineer on the developer forums puts it simply: make sure Xcode is quit before you delete files behind its back.

DerivedData

DerivedData holds build products, indexes and module caches for every project you open. On Apple's developer forums, the accepted answer says you can delete it at any time and it grows back as you load and build projects. The cost is a slower first build and a fresh index.

rm -rf ~/Library/Developer/Xcode/DerivedData/*

At WWDC26, Apple confirmed that Xcode 27 adds a Delete Derived Data menu item, so newer Xcode versions can do this without Terminal.

iOS DeviceSupport

Each time you debug on a real iPhone or iPad running a new iOS version, Xcode copies support files into a folder named for that version. The forum's accepted answer says you can delete any versions that don't match devices you still debug on. If you plug in that device again, Xcode copies them back.

Archives

Each archive holds a built app and its debug symbols (dSYM files). Apple uses those symbols to turn crash reports into readable code. Keep archives for any version people still use. Delete older ones in Xcode's Organizer (choose Window › Organizer), or move them to another disk.

Simulator runtimes

A simulator runtime is a whole copy of iOS, watchOS, tvOS or visionOS for the simulator. Apple's documentation says to choose Xcode › Settings, click Components, then click the Info button next to a component and choose Delete. Xcode shows how much space each one frees.

From Terminal, xcrun simctl runtime list lists them and xcrun simctl runtime delete followed by an identifier removes one. Developers on Apple's forums report that a deleted runtime sometimes comes back, so check in Components afterwards.

Simulator devices

Each simulated device keeps its own apps and data. xcrun simctl delete unavailable removes devices your current Xcode can no longer run, often left behind by old Xcode versions. To remove others, use Window › Devices and Simulators in Xcode. An Apple engineer advises managing CoreSimulator through that window or simctl rather than deleting its folders yourself.

Homebrew

brew cleanup removes old versions of installed packages and downloads more than 120 days old. Add -n first to see what it would remove. brew cleanup --prune=all removes every cached download. Installed packages are not touched.

JavaScript: npm, Yarn, pnpm and node_modules

Docker Desktop

Docker's documentation says Docker Desktop stores all Linux containers and images in one large disk image file. Its location is shown in Docker Desktop under Settings › Resources › Advanced; by default it is under ~/Library/Containers/com.docker.docker.

  1. See what uses the space: docker system df -v.
  2. Remove stopped containers, unused networks, dangling images and build cache: docker system prune. Add -a to also remove every image no container uses.
  3. Be careful with --volumes. Volumes can hold real data, such as a local database.

Docker warns not to move the disk image in Finder, because Docker Desktop can lose track of it. Use Disk image location in the same settings to move it to a bigger drive. Lowering the disk size limit there deletes the image file, and with it every container and image.

Python: pip and conda

pip keeps its cache in ~/Library/Caches/pip on a Mac. python3 -m pip cache info shows its size and python3 -m pip cache purge empties it.

For conda, conda clean --all removes the index cache, unused packages, tarballs and temporary files. Don't add --force-pkgs-dirs: conda warns it can break environments.

Gradle and Android

Gradle keeps its caches in ~/.gradle/caches and cleans them itself. Its documentation says unused version-specific caches are deleted after 30 days, and unused downloaded files after 30 days. To clear them now, stop the daemons with gradle --stop (or ./gradlew --stop in a project), then delete ~/.gradle/caches. The next build downloads what it needs.

Android emulators are stored in ~/.android/avd, and Google says they are mostly very large disk images. Delete ones you don't use in Android Studio's Device Manager: click Menu next to a device and choose Delete. To remove system images and SDK packages, open Tools › SDK Manager and clear their checkboxes. The SDK itself is usually in ~/Library/Android/sdk.

What not to delete

Let a tool find them

If you'd rather not run every command, CloudRoomy's Free Up Space (we make it) looks for most of these in one scan: Xcode DerivedData and device support, iOS simulators not used in 60 days, Android emulators not run in 60 days, Docker images no container uses, node_modules in projects not changed for 30 days, and package caches for npm, Yarn, pnpm, Bun, pip, Gradle, CocoaPods, Cargo, Playwright, Go and Homebrew downloads. It lists everything with its size and deletes nothing until you confirm. Xcode archives older than 14 days are moved to your CloudRoomy drive with a link left behind, rather than deleted. It leaves Docker's disk image, Android SDK system images and simulator runtimes alone.

CloudRoomy needs a Mac with Apple silicon and macOS 26.2 or later, and is free for 30 days with 50 GB. For the rest of the disk, see what is in System Data, and how to offload big apps you rarely open.

Questions people ask

Is it safe to delete Xcode DerivedData?

Yes. On Apple's developer forums the accepted answer says you can delete DerivedData at any time and it grows back as you build. Quit Xcode first. Your next build is a full one, so it takes longer.

How do I delete old iOS simulators?

Remove runtimes in Xcode › Settings › Components: click the Info button next to a runtime, then Delete. Run xcrun simctl delete unavailable to remove simulator devices your Xcode can no longer use.

Does npm cache clean free space?

Yes, but it needs --force: npm cache clean --force. npm says the cache is self-healing, so the only reason to clear it is to get disk space back. Packages download again when you next install.

Why doesn't Docker Desktop give space back when I delete files?

Docker Desktop keeps everything in one disk image file. Docker says space is freed when images are deleted, not when files are deleted inside running containers. Use docker system df to see usage, then docker system prune.

Can I delete node_modules?

Yes, in projects you aren't working on. It is rebuilt from package.json and the lockfile when you run npm install, yarn or pnpm install. Never delete a project's lockfile along with it.

Sources, checked 17 November 2026: Apple, Downloading and installing additional Xcode components; Apple Developer Forums, Xcode using 90GB with ~/Library/Developer: what can I safely clean?; Apple, Xcode Tips and Tricks Group Lab, WWDC26; Apple, Understanding Crashes and Crash Logs, WWDC18; Homebrew, brew manual page; npm, npm cache; Yarn, yarn cache clean and Yarn 1 cache; pnpm, pnpm store and store settings; Docker, Docker Desktop for Mac FAQs and docker system prune; pip, Caching and pip cache; conda, conda clean; Gradle, Gradle-managed directories and caches; Android Developers, Create and manage virtual devices, Environment variables and Update the IDE and SDK tools.

Found a command that has changed? Write to hello@cloudroomy.app.

Make room.

Download for Mac

Free for 30 days with 50 GB · No card · Apple silicon, macOS 26.2 or later