Where Is the Gradle User Home?
Where Gradle keeps its user home with caches, wrappers, and the daemon log on every desktop OS.
Last updated
Gradle funnels user state into one home folder, GRADLE_USER_HOME, defaulting to ~/.gradle on Linux and macOS and %USERPROFILE%/.gradle on Windows. Caches, wrapper dists, daemon logs, and init scripts all live underneath.
That single root makes disk triage easy. caches/modules-2 holds downloaded dependencies, wrapper/dists holds distributions, daemon/ holds logs. Point GRADLE_USER_HOME elsewhere to move the lot, e.g. onto a bigger drive.
Where Gradle stores this, by platform
~/.gradle/
Caches, wrapper dists, daemon logs, init.d. Override with GRADLE_USER_HOME. caches/modules-2 is the dependency store; daemon/ holds per-version logs.
%USERPROFILE%\.gradle\
Same layout under the user profile. Long wrapper paths can hit legacy length limits; keep GRADLE_USER_HOME short or enable long paths.
~/.gradle/
Same layout as Linux. Android Studio projects share this home, so one cleanup frees space for both CLI and IDE builds.
Frequently asked questions
How do I clear the Gradle cache safely?
Stop daemons with gradle --stop, then delete caches/ and the versioned generated/ folder while keeping gradle.properties and init scripts. Next build re-downloads dependencies, so only do this with network available.
Where do wrapper distributions go?
Each project keeps its wrapper jar plus gradle-wrapper.properties pinning the distribution. The large binaries land in the wrapper/dists folder on first run. Back up the project files, not the dists; those re-download.
Notice an outdated path? Let us know.