DevDuster

Free space from ~/.gradle, Android Studio caches, old SDK platforms, NDKs, system images and emulators on your Mac, with what is safe to delete.

Where the space goes

Android work fills four places: Gradle's home folder ~/.gradle, Android Studio's caches, the SDK in ~/Library/Android/sdk and the emulators in ~/.android/avd. Check them:

du -sh ~/.gradle/* ~/Library/Android/sdk/* ~/.android/avd 2>/dev/null | sort -h

Gradle caches

Stop the Gradle daemons first, so nothing writes while you delete:

./gradlew --stop
  • ~/.gradle/caches/build-cache-*: the local build cache, refilled on the next build.
  • ~/.gradle/caches/<version> (such as 8.9): data for one Gradle version. Folders for versions your projects no longer use are never read again.
  • ~/.gradle/wrapper/dists: one full Gradle download per version a project asked for, about 150 MB to 250 MB each. Old ones download again if a project needs them.
  • ~/.gradle/daemon: daemon logs.

Deleting all of ~/.gradle/caches is also safe; the next build downloads every dependency again, which can take a while. Keep ~/.gradle/gradle.properties and ~/.gradle/init.d: those are your settings.

Project build folders

Each project keeps build, .gradle, .cxx (native code) and .kotlin folders. ./gradlew clean removes the build output; the others are rebuilt on the next build, so they are safe to delete in projects you are not working on.

Android Studio caches

Every Android Studio version gets its own folders in ~/Library/Caches/Google/AndroidStudio* and ~/Library/Logs/Google/AndroidStudio*. After an upgrade the old version's folders are never used again. For the current version, File → Invalidate Caches clears them from inside the IDE. Leave ~/Library/Application Support/Google alone; it holds your settings and plugins.

SDK and emulators

Remove what you no longer build against in Settings → Languages & Frameworks → Android SDK (tick Show Package Details), or with sdkmanager --uninstall:

  • sdk/system-images: emulator images, often 1 to 4 GB each. Only images no emulator uses are worth removing.
  • sdk/ndk, sdk/build-tools, sdk/platforms: old versions download again if a project pins them.

Each emulator in ~/.android/avd keeps its own disk. Delete or wipe unused ones in Device Manager; their data, such as installed apps and logins, is lost.

How DevDuster handles Gradle and Android

  • The Gradle build cache, daemon logs and Android SDK Manager cache are in the safe tier, and skipped while a Gradle daemon runs.
  • Old Gradle caches and wrapper versions, old Android Studio caches, Kotlin/Native toolchains and project build, .gradle, .cxx and .kotlin folders (idle 14 days) are in review. The newest version is always kept.
  • Emulators, unused system images and old NDKs, build tools and platforms are in caution: you pick each one.

Do it in one pass. DevDuster is a free, open-source Mac cleaner for developers. It finds all of the above, shows exact paths and sizes, and moves only what you confirm to the Trash.

Every rule DevDuster ships, with its exact paths, is on What's safe to delete.