Delete Unity Library folders to free space
Every Unity project has a Library folder holding imported versions of its assets. It is safe to delete while the project is closed, because Unity re-imports everything the next time you open it, which can take a long time on big projects. Never delete Assets, Packages or ProjectSettings, which are the project itself.
Why it gets big
Unity does not use your source assets directly. It imports each texture, model and audio file into its own format and stores the results in the project’s Library folder. Unity also writes Temp, Logs and, with C# builds, obj folders.
A Library folder can end up larger than the project’s assets, and every project you have opened keeps its own. Old prototypes, game jam projects and tutorial downloads all hold on to theirs. Unity also keeps shared caches in your user Library: package downloads in ~/Library/Unity/cache and Asset Store downloads in ~/Library/Unity/Asset Store-5.x.
Most Unity .gitignore templates exclude Library, Temp, Logs and obj for the same reason: they are generated, not source.
How to clear it by hand
For each project you want to slim down:
- Close the project in the Unity Editor. Deleting Library while the Editor has it open can corrupt the import.
- Check the size:
du -sh MyGame/Library. - Move
Library(andTemp,Logs,objif present) to the Trash.
cd ~/Projects/MyGame
du -sh Library Temp Logs obj 2>/dev/nullTo find every Unity project in your home folder, look for the file Unity writes into each one:
find ~ -maxdepth 5 -path '*/ProjectSettings/ProjectVersion.txt' 2>/dev/nullThe next time you open the project from Unity Hub, it re-imports every asset. For small projects that is quick. For large ones it can take a long time, so the best candidates are projects you are not working on.
- Safe: Library, Temp, Logs and obj. Unity regenerates them.
- Safe, but re-downloaded:
~/Library/Unity/cacheand~/Library/Unity/Asset Store-5.x. Unity fetches packages again when a project needs them. - Also worth checking: old Editor versions. Remove them in Unity Hub, under Installs, rather than in Finder.
- Never delete:
Assets,PackagesandProjectSettings. They are your project, and Unity cannot recreate them.
The same pattern applies to other build output. See node_modules cleanup and Xcode DerivedData.
How Berth handles it
Berth recognises a Unity project by its ProjectSettings/ProjectVersion.txt file. It looks in your Git repositories and in the first two levels of common code folders, such as ~/Projects, ~/Developer and ~/Unity Projects.
- Rebuilds itself: Library, Temp, Logs and obj across your Unity projects, shown as Unity import caches with the cost stated: a long re-import on next open.
- Re-downloadable: the Unity downloads cache in
~/Library/Unity/cache,~/Library/Unity/Asset Store-5.xand~/Library/Caches/com.unity3d.UnityEditor. - Yours, kept: Assets and ProjectSettings are never included.
The finding says how many projects it covers and whether Unity is running right now. Projects stored outside those folders are not found, and Berth does not uninstall Unity Editor versions; use Unity Hub for that.
Whatever Berth finds goes into a review tray first. A dry run shows exactly what would move, pre-flight checks make sure the owning app is closed, and everything goes to the macOS Trash, so Undo puts it back. Berth is free to scan and explore; one-click cleanup is part of Berth Pro, $14.99 one-time for 2 Macs. There is no account and nothing is uploaded.
Questions
Is it safe to delete the Unity Library folder?
Yes, with the project closed. Library only holds imported versions of your assets. Unity rebuilds it the next time you open the project. Assets, Packages and ProjectSettings must stay.
How long does Unity take to rebuild Library?
It depends on how many assets the project has. Small projects re-import quickly, large ones can take a long time, so clear Library on projects you are not actively working on.
Will deleting Library break my project?
No. You may lose small editor state, such as the last open scene, but your scenes, scripts and settings are in Assets and ProjectSettings.
Should the Library folder be in Git?
No. It is generated on each machine, and the standard Unity .gitignore excludes Library, Temp, Logs and obj. Commit Assets, Packages and ProjectSettings instead.
What is ~/Library/Unity/cache?
A shared cache of downloaded packages. Unity downloads a package again the next time a project asks for it.
