Separate build cache from installed SDKs
| Data | Examples | Cost of removal |
|---|---|---|
| Rebuildable IDE/build cache | Android Studio indexes; selected Gradle cache | Re-indexing, downloads and slower builds |
| Versioned SDK components | platforms, build-tools, NDK, system-images | Projects or emulators may still require that exact version |
| AVD device data | Apps, settings and files in an emulator | User/test state can be lost |
Measure the usual locations
du -sh "$HOME/Library/Android/sdk" 2>/dev/null
du -sh "$HOME/.gradle/caches" "$HOME/.gradle/wrapper/dists" 2>/dev/null
du -sh "$HOME/.android/avd" 2>/dev/nullUse the SDK location shown in Android Studio → Tools → SDK Manager if yours differs. Check ANDROID_HOME and a project local.properties file rather than assuming the default path.
Remove one confirmed-unused SDK package
Check compileSdk, buildToolsVersion and ndkVersion in the projects you still build. In Tools → SDK Manager, show package details, deselect a version you no longer need, then Apply. Keep system images used by your AVDs and SDK components pinned by older projects. Newest does not mean sufficient for every project.
For command-line inspection, use the sdkmanager shipped with your SDK and consult its local help. This lists packages; it does not delete them:
sdkmanager --list_installedLet Gradle manage routine cache retention
Gradle already manages retention of many caches. Inspect the layout before sweeping .gradle. Stop running builds and daemons with the wrapper in each active project when doing a manual cleanup:
./gradlew --stopRemove only a confirmed-old wrapper distribution or rebuildable cache entry after reviewing it. Leave gradle.properties, credentials, signing keys and custom init scripts alone. Next builds can need network access to download the wrapper and dependencies; keep required versions when offline.
An emulator image is different from a device
An SDK system image supplies the operating system; an AVD directory contains a configured device and its state. Use Android Studio Device Manager for an intentional device deletion. Clearing an emulator snapshot removes saved state and is not equivalent to removing all AVDs.
Review older versions in DevCleaner
The Android scanner shows caches separately from old SDK/build-tools/NDK/system-image candidates and Gradle wrapper distributions. Keep-newest logic is a starting point for review, not proof that an older project no longer needs a version. See keep-current policies and category evidence.
FAQ
- Can I delete the entire Android SDK?
- That removes platforms and tools needed by projects. Use SDK Manager to remove specific versions after checking project requirements.
- Is an old NDK safe to remove?
- Only if no active project pins it. Check ndkVersion and your build configuration before removing the package.
References and scope
Reviewed against DevCleaner 1.14.5 and the references below on October 4, 2026. Locations can change with tool versions and custom settings. The examples are inspection steps and deliberate cleanup actions, not a measured claim about how much space your Mac will recover.
- Android SDK Manager and unused IDE directories
- sdkmanager command reference
- Gradle cache layout and retention
Review the space before cleaning
DevCleaner separates built-in Safe caches from Warning and Danger items. Safe Quick Clean is free; deep cleanup requires Pro on new Free installations. See Free and Pro features.
Download DevCleaner ↓