Clearing User Caches on a Mac for Game Dev: What’s Safe, What Costs You
Quick answer: Deleting ~/Library/Caches rarely fixes a game developer’s disk problem, because the biggest caches sit elsewhere: Xcode’s DerivedData, Unity project Library folders, Unreal’s Derived Data Cache, and simulator runtimes. Almost all of them are safe to delete. The real question is how long each one takes to rebuild, which ranges from seconds to hours of reimporting.
You emptied ~/Library/Caches, restarted, and got back four gigabytes. Your drive is still red.
That’s normal. The folder macOS calls “user caches” is mostly browser data, app thumbnails, and updater leftovers. Game engines and toolchains keep their really large caches somewhere else, often inside your project folders. cleanup tools that only look in ~/Library/Caches never see them.
This guide maps where those caches live on macOS, what each one costs to rebuild, and how to clear them without losing a day of work.
What “user caches” means on macOS
A user cache is regenerable data an app stores for your account so it doesn’t have to recompute it. On macOS, the conventional location is ~/Library/Caches, with one subfolder per app (usually named by bundle ID, like com.apple.dt.Xcode).
Two other cache locations matter:
/Library/Caches is system-wide and shared across users. It needs admin rights and usually isn’t worth touching. The per-user temp/cache directory under /private/var/folders/. You can find yours with getconf DARWIN_USER_CACHE_DIR. This is where things like the Metal shader cache live.
Then there are developer caches, which follow none of these conventions. Xcode uses ~/Library/Developer. Unity and Unreal keep the heaviest data inside each project. That’s why a game developer’s cleanup has to go project by project.
Find out where your space actually went
Measure before you delete anything. These commands are read-only:
bash # The usual suspects, largest first du -sh ~/Library/Caches \ ~/Library/Developer/Xcode/DerivedData \ ~/Library/Developer/Xcode/iOS\ DeviceSupport \ ~/Library/Developer/CoreSimulator \ ~/Library/Unity \ ~/Library/Application\ Support/Epic 2>/dev/null | sort -hr
For Unity projects, find every project’s Library folder. A Unity project is identified by having a ProjectSettings folder next to Assets:
bash # Adjust ~/Dev to wherever your projects live find ~/Dev -maxdepth 4 -type d -name ProjectSettings 2>/dev/null | while read ps; do p=”$(dirname “$ps”)” [ -d “$p/Library” ] && du -sh “$p/Library” done | sort -hr
For Unreal projects:
bash find ~/Dev -maxdepth 4 -name “*.uproject” 2>/dev/null | while read up; do p=”$(dirname “$up”)” du -shc “$p/DerivedDataCache” “$p/Intermediate” “$p/Saved” 2>/dev/null | tail -1 | sed “s|total|$p|” done | sort -hr
The results are often lopsided. One forgotten prototype from two years ago can outweigh everything in ~/Library/Caches combined.
The cache map, sorted by rebuild cost
Nearly every cache below is safe to delete. What differs is how long you’ll wait the next time you open the project.
Cache Location Safe to delete? Cost to rebuild App caches ~/Library/Caches/* Yes (quit apps first) Seconds; apps refill quietly Homebrew downloads ~/Library/Caches/Homebrew Yes, via brew cleanup None until you reinstall a package Xcode DerivedData ~/Library/Developer/Xcode/DerivedData Yes One full build per project Unavailable simulators ~/Library/Developer/CoreSimulator/Devices Yes, via simctl None iOS DeviceSupport ~/Library/Developer/Xcode/iOS DeviceSupport Yes, for OS versions you no longer test Re-copied when that device reconnects (slow) Unity global cache ~/Library/Unity/cache Yes Packages re-download on next open Unity project Library
~/Library/Caches is the cache folder everyone knows. Quit the apps that own the subfolders first, because some apps hold files open and act strangely if their cache disappears mid-session. Don’t delete the folder itself, only its contents.
Homebrew keeps old package downloads. brew cleanup –prune=all clears them more cleanly than deleting the files by hand.
Unavailable simulators pile up every time Xcode updates:
bash xcrun simctl delete unavailable
With Xcode 15 and later, simulator runtimes (the large ones) are managed separately. List them with xcrun simctl runtime list and remove old ones in Xcode → Settings → Components (called “Platforms” in some versions ).
Tier 2: Cheap to rebuild
Xcode DerivedData is the standard cleanup target for anyone who builds Unity or Unreal projects for iOS or macOS. Every Xcode project you’ve built leaves a folder of intermediates and indexes here, including each generated Xcode project from a Unity iOS build. Deleting it costs you one clean build per project:
bash rm -rf ~/Library/Developer/Xcode/DerivedData/*
iOS DeviceSupport holds debug symbols copied from every iOS version you’ve connected a device on. The folders are often several gigabytes each. Delete the folders for OS versions you no longer test. Keep the one matching your current test device, or the next debug session will start with a long symbol copy.
The Unity global cache (~/Library/Unity/cache) holds downloaded packages shared across projects. Clearing it means packages download again the next time a project opens. On a slow connection that’s annoying, but it isn’t destructive.
Tier 3: Expensive to rebuild
This is where the big disk savings are, and where careless cleanup hurts.
Unity’s project Library folder contains imported assets, compiled scripts, and the artifact database. It’s regenerated from Assets and Packages, which is why it belongs in .gitignore. But regenerating it means a full reimport. For a small 2D project that’s a couple of minutes. For a large 3D project with high-resolution textures and many compressed platform variants, plan for a long wait.
My rule: delete Library freely on projects you aren’t actively working on, and never on the one you’re shipping this week. Reopening an archived prototype later, you won’t mind the reimport.
Two things before you delete it:
Close the Unity Editor. Deleting Library while the project is open can leave it in a broken state. If your team runs a Unity Accelerator (cache server), most of a reimport can come from it instead of being recomputed locally. That changes the math in favor of deleting.
Unreal’s DerivedDataCache stores processed assets and compiled shaders. Deleting it forces recompilation, and