A Unity project's Library folder is bigger than the project
Imported assets are re-encoded into a cache per project, per platform. What is safe to delete, what is not, and what a platform switch costs.
Unity is one of the clearest examples of a general rule: the folder you should not back up is usually the folder that is largest. Every asset you import is re-encoded into a form the target platform can use, and that output is cached per project.
What is in a project folder
| Folder | What it is | Safe to delete |
|---|---|---|
Assets | Your work | No |
ProjectSettings | Project configuration | No |
Packages | Package manifest | No |
Library | Imported asset cache, per platform | Yes, reimported on next open |
Temp and obj | Build scratch | Yes |
Builds | Output you exported | Only if you have the build elsewhere |
find ~ -type d -name Library -maxdepth 5 2>/dev/null \
-exec test -d '{}/../Assets' ';' -print0 \
| xargs -0 du -sh 2>/dev/null | sort -h | tail -15The test for an Assets folder alongside is what stops this matching every other folder called Library on the Mac. Anything printed there is a Unity import cache.
What deleting Library costs
Opening the project again reimports every asset, which on a large project is minutes to hours of work you are choosing to redo. Nothing is lost: the folder is derived entirely from Assets and ProjectSettings. For a project you are not currently working on, that is a good trade. For the one you are shipping this week, it is not.
Editor versions
Each Unity editor version is several gigabytes, plus a module per build target you added. Projects are pinned to a version, so old editors accumulate the same way old SDKs do.
du -sh /Applications/Unity/Hub/Editor/* 2>/dev/null | sort -hRemove editor versions through the Hub rather than deleting folders, so its own list stays accurate. Check which versions your projects are pinned to first, which is recorded in each project's ProjectSettings/ProjectVersion.txt.
Platform switching doubles the cache
Switching build target reimports assets for the new platform, and the cache keeps both. A project that has been built for two or three platforms carries the import cache for all of them, which is often the explanation for a Library folder several times the size of the assets.
The same shape of problem, with the same answer, shows up across every toolchain: build output grouped by project is where developer disk space usually goes.
Common questions
Can I delete Unity's Library folder?
Yes. It is an import cache derived entirely from Assets and ProjectSettings, and Unity rebuilds it when the project is next opened. The cost is reimport time, which on a large project can be substantial.
Why is my Unity project folder so large?
Because the Library folder holds re-encoded copies of every imported asset, per build platform. A project built for several platforms keeps the cache for each, which is often several times the size of the assets themselves.
How do I remove old Unity editor versions?
Through Unity Hub, so its list stays accurate. Check ProjectSettings/ProjectVersion.txt in each project first to see which versions are pinned. Each editor is several gigabytes plus modules per build target.
Should Library be in version control?
No. It is generated output and it changes constantly, which makes it both large and useless in a repository. Assets, ProjectSettings and Packages are what a project actually consists of.