Developer guide · Windows and Mac
Where the Android SDK is installed, and how to shrink it
By Aqib Javed · Updated Oct 22, 2026
Android Studio shows the folder under Tools > SDK Manager, next to Android SDK Location. The usual paths are ~/Library/Android/sdk on a Mac and %LOCALAPPDATA%\Android\Sdk on Windows, and command-line tools read it from ANDROID_HOME (ANDROID_SDK_ROOT is deprecated). To free space, uninstall NDK versions, system images and platforms you no longer use, in SDK Manager or with sdkmanager --uninstall.
Find the SDK folder
- Android Studio: Tools > SDK Manager. The path is at the top, next to Android SDK Location.
- Mac Terminal: echo $ANDROID_HOME
- Windows Command Prompt: echo %ANDROID_HOME%
- A project's local.properties file may point somewhere else with sdk.dir, which is how a second, forgotten SDK copy ends up in use.
What takes the space
- system-images: the Android images emulators run. Usually the largest part.
- ndk: one folder per NDK version. Flutter and many plugins pin a version, so several pile up.
- platforms and build-tools: one per Android API level and build-tools version.
- emulator: the emulator program itself, needed only if you run emulators.
Check before you remove
- NDKs: search your projects for ndkVersion in build.gradle files. Flutter projects use Flutter's default NDK unless they set one.
- System images: each emulator's config.ini names its image in image.sysdir.1. An emulator whose image is gone won't start.
- Platforms: keep the compileSdk and targetSdk your projects use.
Remove what you don't use
In Android Studio: Tools > SDK Manager, tick Show Package Details, untick the versions you don't need, and click Apply. Or with sdkmanager from the SDK's command-line tools:
sdkmanager --list_installed
sdkmanager --uninstall "ndk;25.1.8937393"
sdkmanager --uninstall "system-images;android-33;google_apis;x86_64"Fix a stale ANDROID_HOME
If you moved or reinstalled the SDK, point ANDROID_HOME at the new folder. On a Mac, add export ANDROID_HOME="$HOME/Library/Android/sdk" to ~/.zprofile and open a new terminal. On Windows, set it in System Properties > Environment Variables, or in PowerShell with [Environment]::SetEnvironmentVariable('ANDROID_HOME', "$env:LOCALAPPDATA\Android\Sdk", 'User').
Doing it with Stackyard
Stackyard finds every Android SDK on the machine and flags duplicates. It lists platforms, build-tools, NDKs and system images with their sizes, shows which projects use each NDK and which emulators use each system image, and moves what you remove to the Trash or Recycle Bin. On Windows its doctor also catches an ANDROID_HOME that points to a missing folder and fixes it in one click. It's free and open source, for Windows and Mac.
Questions
Is ANDROID_SDK_ROOT still used?
- It's deprecated. Current Android tools read ANDROID_HOME, so set that one.
Can I delete old NDK versions?
- Yes, if no project pins them with ndkVersion. If a build needs one you removed, Gradle stops with a clear error and you can install it again.
Can I move the Android SDK to another drive?
- Yes. Move the folder, change Android SDK Location in Android Studio's SDK Manager, and update ANDROID_HOME and any local.properties sdk.dir lines.
What happens to an emulator if I delete its system image?
- It won't start until the image is installed again. Check each emulator's config.ini before removing an image.