Skip to content
Aqib Javed.
All guides

Developer guide · Windows and Mac

How to free up space on Windows used by Android Studio and Flutter

By Aqib Javed · Updated Nov 2, 2026

Android Studio's space on Windows is spread over %LOCALAPPDATA%\Android\Sdk (SDK, system images, NDKs), %USERPROFILE%\.android\avd (emulators), %USERPROFILE%\.gradle (Gradle caches) and %LOCALAPPDATA%\Google\AndroidStudio<version> (IDE caches), plus your Flutter SDK folder and %LOCALAPPDATA%\Pub\Cache. Delete unused emulators and system images first, then clear Gradle caches. To keep the rest, move the SDK, emulators and Gradle cache to another drive with ANDROID_HOME, ANDROID_AVD_HOME and GRADLE_USER_HOME.

Where Android Studio and Flutter keep files on Windows

  • Android SDK: %LOCALAPPDATA%\Android\Sdk, which is C:\Users\you\AppData\Local\Android\Sdk. system-images and ndk are usually the biggest folders inside.
  • Emulators: %USERPROFILE%\.android\avd, one .avd folder and one .ini file per emulator.
  • Gradle: %USERPROFILE%\.gradle, with caches and wrapper\dists inside.
  • Android Studio caches and logs: %LOCALAPPDATA%\Google\AndroidStudio<version>. Its settings are in %APPDATA%\Google\AndroidStudio<version>.
  • Flutter SDK: wherever you unzipped it. Flutter's install guide suggests %USERPROFILE%\develop\flutter. Downloaded Dart and Flutter packages are in %LOCALAPPDATA%\Pub\Cache.

How to see how much each one takes

Windows has no du command, and File Explorer's Properties is slow on folders this size. Run this in PowerShell instead; it prints the size of each folder and skips the ones you don't have. Change the Flutter path if yours is elsewhere.

$dirs = "$env:LOCALAPPDATA\Android\Sdk", "$env:USERPROFILE\.android\avd", "$env:USERPROFILE\.gradle",
        "$env:LOCALAPPDATA\Pub\Cache", "$env:USERPROFILE\develop\flutter"
foreach ($d in $dirs) {
  if (Test-Path $d) {
    $gb = (Get-ChildItem $d -Recurse -File -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum / 1GB
    "{0,7:N1} GB  {1}" -f $gb, $d
  }
}

What's safe to delete

  • Emulators you don't use: in Android Studio's Device Manager, open the emulator's menu and choose Delete. Wipe Data keeps the emulator but resets it.
  • System images and NDK versions nothing uses: Tools > SDK Manager, tick Show Package Details, untick them and click Apply. Check that no emulator still runs an image first.
  • Gradle caches: %USERPROFILE%\.gradle\caches and wrapper\dists, after running gradlew --stop. Gradle downloads what it needs on the next build.
  • Old Android Studio folders: each version gets its own AndroidStudio<version> folder in %LOCALAPPDATA%\Google and %APPDATA%\Google. Delete the ones for versions you no longer run, and leave Chrome's folders next to them alone.
  • The pub cache: dart pub cache clean empties it, and the next flutter pub get downloads packages again. Extra Flutter versions installed with FVM go with fvm remove <version>.
  • Project build output: flutter clean in a Flutter project, or gradlew clean in an Android one.
  • Keep the platforms and build-tools your projects compile against.

How to move the SDK, emulators and Gradle cache to another drive

  1. Close Android Studio and stop Gradle with gradlew --stop in any project.
  2. Move %LOCALAPPDATA%\Android\Sdk to the new drive, for example D:\Android\Sdk. In Android Studio, open Tools > SDK Manager and change Android SDK Location to the new folder. Set the ANDROID_HOME user variable to it too (ANDROID_SDK_ROOT is deprecated), and if you use Flutter, run flutter config --android-sdk D:\Android\Sdk.
  3. Move the contents of %USERPROFILE%\.android\avd to, say, D:\Android\avd, and set ANDROID_AVD_HOME to that folder. Each emulator's .ini file has a path= line with the old location; edit it to the new one, or the emulator isn't found.
  4. Set GRADLE_USER_HOME to a folder on the new drive, for example D:\gradle. Move .gradle there, or let Gradle fill the new folder from scratch.
  5. To set the variables, search the Start menu for environment variables and open Edit environment variables for your account, or use PowerShell: [Environment]::SetEnvironmentVariable('ANDROID_AVD_HOME', 'D:\Android\avd', 'User'). Restart Android Studio and open a new terminal so they're picked up.
  6. Start an emulator and run a build to check everything is found, then delete the old folders.

What Stackyard does on Windows

Stackyard is a free, open-source app for Windows 10 and 11 and for Mac. It lists the Android SDK's platforms, NDKs and system images with the projects and emulators that use them, your emulators with their size and last start, the Gradle caches and wrapper versions, each Flutter version with the projects that use it (FVM's cache included), and build folders in projects you haven't touched. Everything you remove goes to the Recycle Bin, so you can restore it. On Windows its doctor also catches a JAVA_HOME or PATH entry that points to a missing folder and fixes it. It doesn't uninstall Android Studio or clear the IDE's own caches and logs.

Questions

Why is Android Studio taking up so much space?

The IDE is the small part. The SDK keeps every system image, NDK and platform you've installed, each emulator keeps its own disk images, and Gradle caches every dependency and Gradle version your projects have used.

Can I delete the .android folder on Windows?

You can, but it removes your emulators, adb keys and the debug keystore. Delete single emulators instead, and back up debug.keystore if its SHA-1 is registered with Firebase or Google Sign-In.

How do I move Android Studio to another drive?

Uninstall it and install it again on the other drive, or leave the IDE where it is and move the SDK, emulators and Gradle cache, the parts that keep growing, with the steps above.

Is it safe to delete the AndroidStudio folders in AppData?

Yes for the ones in %LOCALAPPDATA%\Google: they hold caches and logs that Android Studio rebuilds, though it reindexes your projects on the next start. Folders for versions you no longer run can go entirely, including their settings in %APPDATA%\Google.

Where is the Android SDK on Windows?

By default in %LOCALAPPDATA%\Android\Sdk, which is C:\Users\you\AppData\Local\Android\Sdk. Android Studio shows the path in Tools > SDK Manager, next to Android SDK Location.