What is ~/.android/avd on Mac? Is it safe to delete?
You can delete the emulators in ~/.android/avd that you no longer use. Each one is a virtual Android device with its own storage, so deleting it also deletes the apps and data inside it. Remove them from Android Studio's Device Manager.
Where it is
~/.android/avdWhat it is
An AVD, or Android Virtual Device, is an emulator you created in Android Studio. Each has a folder ending in .avd and a small .ini file in ~/.android/avd.
The folder holds the device's writable storage: installed apps, their data, and any snapshots saved so the emulator can start quickly. The Android system itself is not here. It comes from the system images in the Android SDK.
An emulator starts small and grows as you install apps and save snapshots. Old devices you created for one test and forgot stay at whatever size they reached.
How big it gets
Usually several GB per virtual device, more for devices with many snapshots.
How to clear it by hand
- Run the command below to see how large each virtual device is.
- In Android Studio, open Device Manager from the Tools menu.
- For a device you no longer need, open its menu and choose Delete.
- For a device you want to keep but shrink, choose Wipe Data from the same menu. It resets the device to a clean state.
- From Terminal, avdmanager list avd shows the devices and avdmanager delete avd -n followed by a name removes one.
du -sh ~/.android/avd/*.avdWhat happens afterwards
The deleted device disappears from Device Manager along with everything installed on it. You can create a new one at any time, and it starts from a clean system image.
How Diskzy handles it
Diskzy shows ~/.android/avd on the disk map with the size of each virtual device, which makes forgotten emulators easy to find. Deleting them is best done in Device Manager.
Related guides
- Android SDK~/Library/Android/sdk
- CoreSimulator Devices~/Library/Developer/CoreSimulator/Devices
- Gradle caches~/.gradle/caches
See where your Mac's space went
Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.
Try Diskzy for free