Language toolchains & SDKs

Unity Cache Cleanup on Mac: Asset, GI & Library Caches That Eat 50GB+

If you've been developing games or interactive experiences in Unity for any length of time, your Mac is quietly accumulating gigabytes — sometimes well over 50GB — of cached data spread across multiple locations. A thorough Unity cache cleanup on Mac can recover substantial disk space without losing a single line of your actual project source. This guide walks through every major cache location, explains what each folder stores, and shows you exactly how to delete what's safe versus what you should keep.

Why Unity Caches Get So Large

Unity's editor and build pipeline generate caches at several layers. Every time you import an asset, Unity processes it into a platform-specific format and writes the result to disk so it doesn't have to re-import on every launch. The same principle applies to baked lighting data (GI cache), shader variants, and the project's auto-generated Library folder. On a project that has been through dozens of iterations — changing target platforms, toggling render pipelines, or experimenting with lighting — these caches compound quickly.

Apple Silicon Macs (M1 through M4) and Intel Macs running macOS Sequoia or Tahoe both accumulate the same categories of Unity cache. The paths are identical regardless of chip architecture.

Unity Cache Locations at a Glance

The table below maps each major cache type to its path on macOS, its typical size range, and whether it is safe to delete while all Unity projects are closed.

Cache Type Default Path on macOS Typical Size Safe to Delete?
Asset Import Cache (global) ~/Library/Unity/Asset Store-5.x / ~/Library/Caches/com.unity3d.UnityEditor5.x 5–40 GB Yes — re-imported on next open
GI (Global Illumination) Cache ~/Library/Caches/com.unity3d.UnityEditor/GiCache 10–30 GB Yes — baked lighting recalculated on demand
Project Library Folder <YourProject>/Library/ 1–20 GB per project Yes — regenerated on next project open
Project Temp Folder <YourProject>/Temp/ 100 MB–2 GB Yes — always safe to remove
Shader Cache ~/Library/Caches/com.unity3d.UnityEditor/ShaderCache 500 MB–5 GB Yes — shaders recompile on next launch
Package Cache ~/Library/Unity/cache/packages 500 MB–5 GB Mostly yes — re-downloaded from registry if missing
Unity Hub Download Cache ~/Library/Application Support/UnityHub 500 MB–3 GB Yes — installer files only

How to Clear the GI Cache in Unity Editor (Step-by-Step)

The GI cache is usually the biggest single offender. Unity provides a built-in control panel for it so you don't have to navigate the file system manually.

  1. Open Unity Editor and load any project.
  2. Go to Edit > Preferences (or Unity > Settings on macOS).
  3. Select the GI Cache tab in the left sidebar.
  4. Note the Cache Size value — this is the maximum Unity allows before auto-purging older entries.
  5. Click Clean Cache to immediately remove all cached GI data.
  6. Optionally reduce the Maximum Cache Size (GB) field to something more conservative, such as 5 GB, so it never grows out of control again.

After cleaning, Unity will re-bake lighting the next time you open a scene that uses baked or mixed lighting. On Apple Silicon the rebake is noticeably faster than it was on older Intel hardware, so keeping the limit low is a reasonable trade-off.

Deleting the Project Library and Temp Folders

Each Unity project has its own Library/ and Temp/ folders sitting alongside your Assets/ folder. These are entirely regenerated by Unity and are explicitly listed in Unity's default .gitignore — they are never source-controlled for good reason.

To remove them from the command line for a project located at ~/dev/MyGame:

rm -rf ~/dev/MyGame/Library
rm -rf ~/dev/MyGame/Temp

If you have multiple projects, you can find and remove all Temp folders under a development root in one pass:

find ~/dev -maxdepth 3 -name Temp -type d -exec rm -rf {} +

The -maxdepth 3 flag prevents the command from descending too deeply into nested subdirectories and accidentally touching unintended folders. Adjust the depth as needed for your project layout.

Important: Make sure Unity is fully closed before deleting any project's Library/ folder. Deleting it while the editor has the project open can leave Unity in an inconsistent state and may require a force-quit.

Clearing the Global Asset Import Cache

Unity maintains a global import cache that it shares across projects, located at:

  • ~/Library/Caches/com.unity3d.UnityEditor5.x — the primary artifact cache for Unity 5 and later
  • ~/Library/Unity/Asset Store-5.x — downloaded Asset Store packages (these are installers, not your project files)

You can safely remove the contents of ~/Library/Caches/com.unity3d.UnityEditor5.x entirely. Asset Store packages in ~/Library/Unity/Asset Store-5.x can also be deleted if you've already imported them into your projects — you can re-download from the Asset Store window at any time.

To check how large these folders are before deleting:

du -sh ~/Library/Caches/com.unity3d.UnityEditor5.x
du -sh "~/Library/Unity/Asset Store-5.x"

Unity Package Cache and Hub Downloads

The Unity Package Manager keeps a local cache of every package version it has ever resolved, stored at:

  • ~/Library/Unity/cache/packages — per-version package tarballs
  • ~/Library/Unity/cache/npm — npm-format metadata fetched from the Unity package registry

Deleting these folders causes the Package Manager to re-download packages the next time you open an affected project. This is safe, but can be slow on a poor connection. If you're on a fast connection and reclaiming space is the priority, these are fair game.

Unity Hub also stores editor installer downloads under ~/Library/Application Support/UnityHub. The actual installed editors live in /Applications/Unity/Hub/Editor/ (the system /Applications folder, not your home directory). Deleting files under UnityHub only removes the cached installers, not the installed editors themselves.

How Much Space Can You Actually Reclaim?

Results vary by workflow, but developers with multiple projects and a few years of history routinely report recovering 50–100 GB. The biggest wins come from:

  • GI cache: easily 10–30 GB if you've worked on projects with baked lighting
  • Library folders across multiple projects: 5–20 GB each, multiplied by however many stale projects you have on disk
  • Asset Store packages: especially if you've downloaded large texture or audio packs over the years

If you also do Xcode builds as part of Unity's iOS or tvOS pipeline, DerivedData can add another significant layer — see the related guide on why Xcode takes up so much space for details on clearing that separately.

Keeping Unity Cache Under Control Going Forward

Reactive cleanup works, but a few habits keep things manageable long-term:

  • Set the GI cache limit to 5–10 GB in Preferences so Unity self-prunes older entries automatically.
  • Delete the Library/ and Temp/ folders from any project you archive or move to cold storage — they're fully regenerable.
  • After finishing an Asset Store–heavy evaluation period, prune ~/Library/Unity/Asset Store-5.x; you can re-download anything you actually purchased.
  • Run a periodic disk audit. A tool like Crumb can audit all of these locations at once and show what's safe to remove before anything is deleted, which is useful when you have dozens of stale projects across multiple drives.
  • Add Library/, Temp/, and .DS_Store to your project's .gitignore if they aren't already — Unity's default template includes these, but projects migrated from older versions sometimes don't.

For a broader view of what's consuming space on your Mac beyond Unity alone, the full Mac storage breakdown guide covers developer caches, system data, and application leftovers in one place.

Reclaim your disk in one click

Crumb audits your whole Mac, tells you what's safe to delete, and frees the space in seconds — private, local, and Apple-notarized.

Download Crumb for macOS

Frequently asked questions

Is it safe to delete the Unity Library folder?
Yes. The Library folder is a generated cache that Unity rebuilds automatically the next time you open the project. You will not lose any source assets, scripts, or scenes. The only cost is the time Unity spends re-importing assets on the next launch, which can take several minutes for large projects.
Where is the Unity GI cache stored on Mac?
The Global Illumination cache is stored at ~/Library/Caches/com.unity3d.UnityEditor/GiCache. You can delete this folder directly, or use the built-in Clean Cache button under Edit > Preferences > GI Cache inside the Unity Editor.
Will deleting the Unity cache delete my project files or assets?
No. Cache folders — Library, Temp, GI Cache, and the global import cache — contain only derived data that Unity regenerates from your actual source files. Your Assets folder, scripts, scenes, and prefabs are never stored in the cache and are not affected.
How much space can I reclaim by cleaning Unity caches on Mac?
It depends on how many projects you have and whether they use baked lighting, but 20–50 GB is common for developers with a year or more of Unity work on their machine. Projects with large Asset Store downloads or extensive GI baking can push that figure above 100 GB.
Do I need to close Unity before deleting cache folders?
Yes. You should quit Unity Editor completely before manually deleting Library or cache folders. Removing files while the editor has a project open can cause errors or force you to restart the editor. The safest approach is to quit Unity, delete the folders, then reopen your project.