Is it safe to delete Android emulators in ~/.android/avd?
- Yes, the ones you don’t use, from Android Studio’s Device Manager. Each emulator, or AVD, keeps its own disk images: the apps you installed, their data, an emulated SD card and saved snapshots.
- What it costs you: everything on that virtual device. The Android system image it was made from stays in the SDK, so you can create a fresh emulator without downloading Android again.
- Does it come back? Only as a new, empty device you create again. Its apps, sign-ins and snapshots don’t come back.
- SiftMac’s verdict: You decide
1. What it is
An Android Virtual Device (AVD) is an emulator profile: a hardware profile, a system image with the Android version, and a storage area of its own on your Mac. Google’s documentation describes that storage area as holding the device’s user data, such as installed apps and settings, and an emulated SD card.
The system image itself is read-only and shared by every AVD of the same type; it lives in the Android SDK. What makes each AVD big is its own writable copies, kept in its data folder:
userdata-qemu.img: the data partition, with installed apps, settings, databases and files.sdcard.img: the emulated SD card, if the AVD has one.- Snapshots: saved emulator states, including the Quick Boot state the emulator loads so it starts quickly.
cache.img: a temporary cache partition, which the emulator deletes when the device powers off.
2. Where it is
~/.android/avd
Each emulator is a <name>.avd folder, with a matching <name>.ini file next to it. If you’ve set ANDROID_AVD_HOME, the AVDs are wherever that points instead. In Device Manager, an emulator’s menu has Show on Disk, which opens its files in Finder.
3. How big it gets
Google describes the AVD folder as mostly very large disk images, and suggests moving it with ANDROID_AVD_HOME when the default disk is low on space. An emulator grows as you install apps and save snapshots, and every one you create adds its own set. To see each one, and the names the emulator knows them by:
du -sh ~/.android/avd/*.avd | sort -h
~/Library/Android/sdk/emulator/emulator -list-avds
4. How to delete it safely
- Stop the emulator if it’s running: close its window, or choose Stop from its menu in Device Manager.
- In Android Studio, open Device Manager: View › Tool Windows › Device Manager, or More Actions › Virtual Device Manager on the Welcome screen.
- On the emulator you don’t need, click its menu and choose Delete.
To keep an emulator but empty it, choose Wipe Data from the same menu instead: installed apps and settings go, and the device stays in the list as if new.
Without Android Studio, the SDK’s command-line tools delete an AVD by name. Google now marks avdmanager as deprecated in favour of its new android emulator command, but it still does the job:
~/Library/Android/sdk/cmdline-tools/latest/bin/avdmanager delete avd -n <name>
5. What happens afterwards
- The emulator disappears from Device Manager and from Android Studio’s list of run targets, with every app, account and file that was on it.
- Your projects and the SDK, system images included, stay as they were. A new emulator from Device Manager needs no download if its system image is still installed.
- If no other emulator uses that system image, you can remove the image next, in the SDK Manager: see the Android SDK.
6. What to leave in ~/.android
~/.android is the user preferences folder for the Android SDK’s tools, and only its avd folder is big. Delete emulators through Device Manager and leave the small files around them alone. If you’re short of space, Gradle’s caches are another big Android folder that does download again.
Questions
Does deleting an emulator delete the Android system image?
No. System images live in the SDK and are shared by every emulator of that version. Remove them separately in the SDK Manager once no emulator needs them.
Is Wipe Data the same as deleting?
No. Wipe Data resets the emulator to how it was when you created it, and the device stays in Device Manager. Google also notes that the emulator’s command-line -wipe-data option leaves the SD card image as it is.
Can I keep emulators on another drive?
Yes. Google suggests setting ANDROID_AVD_HOME to a folder elsewhere when the default disk is low on space, and avdmanager move avd moves an existing emulator.
How SiftMac handles it. SiftMac doesn’t delete Android emulators. Its space map shows how much ~/.android takes and labels it as Android’s emulator images and settings, best left to Android Studio, where you remove the emulators you don’t use.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works