Android Studio using too much space? Where it goes on a Mac
Android Studio does not take much space by itself. What fills a disk is everything around it: the SDK, the emulators, Gradle and the IDE’s own caches. Together they can reach tens of gigabytes. Here is where they live and which you can reduce.
The paths below are the usual ones on macOS. They can differ by Android Studio version and by how you installed things, so measure first.
Measure first
du -sh ~/Library/Android/sdk ~/.android ~/.gradle 2>/dev/null
du -sh ~/Library/Caches/Google/AndroidStudio* 2>/dev/null
du -sh ~/Library/Application\ Support/Google/AndroidStudio* 2>/dev/null
Where the space goes
| What | Where | Safe to reduce? |
|---|---|---|
| SDK platforms and system images | ~/Library/Android/sdk |
Yes, in the SDK Manager |
| Emulators (virtual devices) | ~/.android/avd |
Yes, in the Device Manager |
| Gradle caches | ~/.gradle/caches |
Yes, downloaded again |
| IDE caches | ~/Library/Caches/Google/AndroidStudio… |
Yes, rebuilt |
| IDE settings | ~/Library/Application Support/Google/AndroidStudio… |
Keep |
SDK and system images
The SDK folder is usually the biggest. Each Android version has a platform, and each emulator image is a large download. Do not delete these folders by hand. In Android Studio, open Settings → Languages & Frameworks → Android SDK, switch to the SDK Platforms and SDK Tools tabs, uncheck what you do not use and apply. The manager removes them cleanly, and you can download them again.
Emulators
Each virtual device has a disk image, and a few emulators add up quickly. Open the Device Manager, and delete the devices you do not use. Their data is lost; creating a new one takes a few minutes.
Gradle
Gradle’s folder grows with every project. See Gradle cache too big for what to delete, and what to keep.
IDE caches
Android Studio has a built-in way to rebuild its caches: File → Invalidate Caches…. It also restarts the IDE, so use it when the IDE misbehaves. To simply reclaim space, close Android Studio and delete the AndroidStudio… folder inside ~/Library/Caches/Google. It is rebuilt on the next start. Do not delete the folder with the same name in Application Support: that holds your settings.
What it costs
- SDK and emulators: a download when you need them again, and the loss of emulator data.
- Gradle and IDE caches: a slower next sync and build, and a network connection to fetch dependencies.
- Your projects are never involved.
Where to go next
Android tooling is one of several heavy things on a developer Mac. See the full checklist, and if you also build for iOS, the Xcode folders that grow.
Quick answers
Is it safe to delete the Android emulators?
Yes, if you no longer use them. Virtual devices can be created again in the Device Manager. Their data is lost, though.
Can I delete SDK system images I do not use?
Yes. In the SDK Manager, uncheck the images and platforms you do not need and apply the change. You can download them again later.
Do these paths depend on my Android Studio version?
Some do, especially the IDE cache folders, which include the version in their name. Check the folder sizes with du before you delete anything.