~/.gradle/caches is where Gradle stores downloaded dependencies, the local build cache and transformed files for Android and Java projects. It is safe to delete. Stop Gradle and quit Android Studio first, then remove the folder. The next build downloads dependencies again, so expect a slower first build.
- Path
~/.gradle/caches- What it is
- Downloaded dependencies, build cache and transformed artifacts used by Gradle
- Typical size
- Commonly 5 to 20 gigabytes on Android developer Macs; one real Mac had 11 GB here
- Made by
- Gradle (Android Studio, command-line builds)
- Safe to delete?
- Safe to clear
- Comes back?
- Yes. The first build afterward downloads dependencies again and is slower
What is in this folder?
Gradle's user home keeps global settings and logs next to the caches. The caches folder has version-specific subfolders and some shared ones such as modules-2 for downloaded libraries, transforms for processed files and build-cache-1 for the local build cache. The Gradle documentation says Gradle creates, uses and cleans these caches automatically, but only removes entries that went unused for a period.
In practice it still grows: every Gradle version, Android Gradle plugin and dependency version adds more. On the developer's own Mac, deleting ~/.gradle/caches (11 GB) and the Gradle wrapper downloads (724 MB) took free space from 2.2 GB to 14 GB.
Is it safe to delete?
Yes. It is a cache of things Gradle can download or recompute. Your code, build.gradle files and signing keys are not in it. The cost is a long first build and a full re-download of dependencies, so do it with a network connection.
Do not delete the whole ~/.gradle folder blindly. It can also hold gradle.properties with signing passwords and init.d scripts. Delete only caches.
How do I clear it by hand?
- Quit Android Studio and stop the Gradle daemons.
- Delete the caches folder.
- Open a project and sync. The first build downloads what it needs.
./gradlew --stop
rm -rf ~/.gradle/cachesRun ./gradlew --stop from any project folder that has a Gradle wrapper. Do not delete caches during a build, because it breaks the build in progress.
How do I stop it growing?
Gradle trims unused entries by itself, so the biggest wins come from removing old Gradle versions in ~/.gradle/wrapper/dists and clearing caches after big upgrades.
How Clean House handles it
Clean House lists ~/.gradle/caches as a Gradle cache that downloads again and moves the whole folder to the Trash as one unit. It treats ~/.gradle itself carefully: the parent folder is only offered when no gradle.properties or init.d is present, so signing keys are not swept up.