Free up space used by Android Studio and Gradle on Mac
Updated November 24, 2026
Android development is storage-hungry: Gradle caches every dependency and every Gradle version, each emulator is a multi-GB virtual disk, and system images stack up with every Android release. Here's what's safe to remove on a Mac and how.
Check the sizes
du -sh ~/.gradle/caches ~/.gradle/wrapper/dists ~/.android/avd ~/Library/Android/sdk/system-images ~/Library/Caches/Google 2>/dev/null
1. Gradle caches Safe
~/.gradle/caches holds downloaded dependencies and build caches for every project. Stop the Gradle daemons first so no files are in use, then delete it:
./gradlew --stop # from any project, or: gradle --stop
rm -rf ~/.gradle/caches
The next build downloads what it needs again, so it will be slower once. Keep ~/.gradle/gradle.properties — that's your settings file, not a cache.
2. Old Gradle versions Safe
Every Gradle version any project's wrapper ever asked for is kept in ~/.gradle/wrapper/dists (100–200 MB each). Delete the versions your current projects don't use; a project downloads its version again if needed.
ls ~/.gradle/wrapper/dists
3. Emulators (AVDs) Erases emulator data
Each Android Virtual Device lives in ~/.android/avd and can be 2–10 GB including its snapshots. Delete the ones you don't use from Android Studio → Device Manager (⋮ → Delete), or:
avdmanager list avd
avdmanager delete avd -n <name>
To keep an emulator but shrink it, use Wipe Data in Device Manager.
4. Unused system images Safe
Emulator system images are stored in ~/Library/Android/sdk/system-images, 1–4 GB each. Remove versions no emulator uses in Android Studio → Settings → Languages & Frameworks → Android SDK → SDK Platforms (tick Show Package Details), or with sdkmanager:
sdkmanager --list_installed
sdkmanager --uninstall "system-images;android-33;google_apis;arm64-v8a"
Use the exact package names from the first command.
5. Android Studio caches and old versions Safe
Android Studio keeps caches and logs per version in ~/Library/Caches/Google/AndroidStudio*. After upgrading, the folders for old versions are never used again:
ls ~/Library/Caches/Google ~/Library/Application\ Support/Google
Delete folders for Android Studio versions you no longer have installed. For the current version, File → Invalidate Caches… clears its caches safely.
6. Project build folders Safe
Each Android project has build folders (one per module), a .gradle folder and often .cxx for native code. They're regenerated by the next build, so old projects can be cleaned with Build → Clean Project or by deleting those folders.
How MacDejunk handles Android
MacDejunk measures the Gradle caches and wrapper versions, lists each emulator and system image with its size, finds Android Studio caches, and locates build, .gradle and .cxx folders in your projects.
Do it in one click with MacDejunk
MacDejunk is a free Mac app that finds this junk (and the rest of what Xcode, Android, Node, Flutter and Homebrew leave behind), shows what's safe to delete, and frees the space. Everything stays on your Mac.
Download MacDejunk — free