Free up Android Studio space without breaking Expo or React Native
If you build with Expo or React Native, ~/Library/Android and ~/.android can take 20 GB or more. You don't have to delete everything: the problem is usually an old system image or an emulator you no longer use.
What Expo needs (don't delete)
Don't touchplatform-tools (adb), the emulator, the build-tools and platform for the version your project targets, and at least one working emulator. Delete these and expo run:android stops working.
The file you must never delete: debug.keystore
Don't touch~/.android/debug.keystore signs your development builds. If you lose it a new one is generated, but the SHA-1 fingerprints you registered with Google, Firebase or Maps change and you'll have to set them up again. If you sign production builds with your own keystore, that one is irreplaceable: without it you can't update your app on the Play Store.
Old emulators and system images
Regenerates, with a costIn Android Studio: Device Manager → delete emulators you don't use. Then SDK Manager → SDK Platforms and uncheck system images for versions you no longer test. Each one takes 1 to 4 GB.
Gradle cache
Regenerates, with a cost~/.gradle/caches regenerates on its own, but your next Android build will be slower because it re-downloads dependencies.
du -sh ~/.gradle/cachesFAQ
Can I delete the whole Android folder and reinstall?
You can, but you'll re-download several GB and set everything up again. Deleting old emulators and system images is almost always enough.
Keep reading
How to free up space from Xcode and iOS simulators
DerivedData, simulators, iOS runtimes and DeviceSupport can take 20–90 GB. What to delete and how to do it right.
How to find and delete old node_modules on Mac
Find every node_modules folder on your Mac, sort them by size and delete the ones from inactive projects. They reinstall with one command.
How to clear the npm, pnpm, yarn and Homebrew caches
Package managers never clean their own cache. These commands reclaim 2 to 15 GB on a developer Mac.