Unity fills a disk in three places. Each Editor version Unity Hub installs takes 5 to 15 GB, and Hub keeps every version side by side. Unity’s caches hold packages and Asset Store downloads. And every project has a Library folder, often 2 to 20 GB, that Unity builds from your assets.
What is safe to delete
| What | Where | Safe? |
|---|---|---|
| Old Editor versions | Mac /Applications/Unity/Hub/Editor/<version>, Ubuntu ~/Unity/Hub/Editor/<version> |
Yes, if no project still uses that version |
| Package cache | Mac ~/Library/Unity/cache, Ubuntu ~/.config/unity3d/cache |
Yes, downloaded again |
| Asset Store downloads | Mac ~/Library/Unity/Asset Store-5.x, Ubuntu ~/.local/share/unity3d/Asset Store-5.x |
Yes, download them again from My Assets |
A project’s Library, Temp, Logs, obj |
inside the project | Yes, with the project closed; the next open re-imports everything |
A project’s Assets, Packages, ProjectSettings |
inside the project | No, this is your project |
| Licenses | Mac ~/Library/Unity/Licenses |
No |
| Game saves | Ubuntu ~/.config/unity3d/<Company>/<Product> |
No, these are saved games |
Old Editor versions
Check which version each project uses: it is in the project’s ProjectSettings/ProjectVersion.txt (m_EditorVersion), and Unity Hub shows it in the Projects list. Then remove the others in Unity Hub: Installs, the gear (or ⋯) next to a version, Uninstall. Hub removes the folder and forgets the version.
To see what is installed and how big:
du -sh /Applications/Unity/Hub/Editor/* # Mac
du -sh ~/Unity/Hub/Editor/* # Ubuntu
If you changed the install location in Unity Hub (Preferences › Installs), the editors are there instead. A version you remove can be installed again from Hub’s Installs page, or from the Unity download archive for an older one.
Unity caches
Quit Unity and Unity Hub, then:
# Mac
rm -r ~/Library/Unity/cache
rm -r ~/Library/Unity/"Asset Store-5.x"
# Ubuntu
rm -r ~/.config/unity3d/cache
rm -r ~/.local/share/unity3d/"Asset Store-5.x"
Do not delete ~/.config/unity3d itself on Ubuntu: Unity games save their progress in folders under it.
The project Library folder
Library holds the imported version of every asset. Unity builds it again when you open the project, which can take from minutes to an hour on a big project. It is worth deleting for projects you rarely open, or when an import is broken. Close the project in Unity, then from the project folder:
rm -r Library Temp Logs obj
These folders should not be in version control; the usual Unity .gitignore excludes them.
How CleanMate does it
On Ubuntu 2.2.0 and from macOS 1.6, CleanMate lists Unity in Smart Scan under developer junk (all macOS features, all Ubuntu features):
- Old Unity Editor versions, one row per version such as “Unity 2022.3.10f1”, with its size. The newest version is always kept, as is every version a project uses, read from its
ProjectVersion.txtin Unity Hub’s project list and in your project folders. Unticked. On a Mac it goes to the Trash so Undo puts it back; on Ubuntu it is deleted, and Unity Hub installs it again. Skipped while that Unity or Unity Hub runs; on a Mac a version owned by root is shown locked (delete it with Finder). - Unity caches, unticked: on a Mac the package cache (
~/Library/Unity/cache) and Asset Store downloads (~/Library/Unity/Asset Store-5.x); on Ubuntu~/.cache/unity3d,~/.config/unity3d/cacheand~/.local/share/unity3d. Licenses, settings and game saves are never touched.
CleanMate does not delete project Library folders: use the command above. Build folders of other project types are covered in old node_modules and build folders; Android SDK versions Unity’s Android builds use in Android Studio disk space.
FAQ
Can I delete an Editor version a project uses? Yes, but opening that project then asks you to install it again or to upgrade the project, which can change it.
Will deleting Library lose my work? No. Your scenes, scripts and assets are in Assets; Library only holds what Unity built from them.
