Use Android Studio’s SDK Manager to remove unused SDK packages, and Device Manager to remove virtual devices. Deleting a virtual device does not mean every SDK component that supported it has also disappeared.
The right cleanup list depends on your projects. A package that looks old may be required by a maintenance branch, a native dependency, or a device-compatibility test.
Understand the separate storage categories
- Virtual device: its configuration and writable device data.
- System image: the Android image used to start compatible virtual devices.
- SDK platform: APIs used when compiling for a particular platform.
- Build tools and NDK: toolchain components that a project may request explicitly.
Check each active project’s Gradle configuration for its compile SDK and any pinned build-tools or NDK version. Then list the emulator configurations you actually use. This is a better basis for removal than retaining only the package with the largest version number.
Start with the graphical package manager
- Close running emulators and stop active builds.
- Open Tools > SDK Manager in Android Studio and note the displayed SDK location.
- Review installed SDK Platforms and SDK Tools. Enable package details where available to distinguish versions and images.
- Deselect only packages you have established are unused, then review the removal summary before applying.
- Build an active project and start a retained emulator afterward.
Android’s command-line tools overview describes the relationship between SDK Manager and the package tools. For virtual-device cleanup itself, use our Android emulator storage guide.
For command-line users: list before uninstalling
If sdkmanager is available in your shell, inspect its installed packages first:
sdkmanager --list
After checking a specific package against your projects, remove it by its exact identifier. The following is an example only; it is appropriate solely if that package is installed and no retained workflow needs it:
sdkmanager --uninstall "system-images;android-30;google_apis;x86_64"
The quotes are required because semicolons have meaning to the shell. If the command is not found, locate SDK Command-Line Tools in the SDK Manager rather than inventing a path. The official sdkmanager reference documents listing, package identifiers, and uninstall syntax.
If a project stops building
Read the first missing-package error and reinstall that exact component. Do not upgrade the project as an accidental side effect of freeing disk space. Your cleanup notes should make it easy to reverse a mistaken removal.
A useful record contains the package identifier, the project check you performed, and the date. Keep it until at least one normal build and test cycle has completed. If you work offline, retain the components you would otherwise need to download.
When the SDK is not the main problem
Measure the SDK path shown by the IDE. If it is small, inspect emulator data, project build output, and Gradle caches separately. Our Android Studio storage map helps separate those categories. Removing a package from one SDK installation also will not shrink another copy used by a different tool.