Developer disk space

Remove Unused Android SDK Packages on Mac

Separate Android virtual devices from system images, SDK platforms, and NDK versions so you can remove unused packages without breaking active builds.

On this page
  1. Understand the separate storage categories
  2. Start with the graphical package manager
  3. For command-line users: list before uninstalling
  4. If a project stops building
  5. When the SDK is not the main problem
  6. FAQ

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

  1. Close running emulators and stop active builds.
  2. Open Tools > SDK Manager in Android Studio and note the displayed SDK location.
  3. Review installed SDK Platforms and SDK Tools. Enable package details where available to distinguish versions and images.
  4. Deselect only packages you have established are unused, then review the removal summary before applying.
  5. 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.

Skip the detective work.

Crumb finds Xcode data, build artifacts and package caches across your projects and frees them in one pass.

Download Crumb free

Free to try on macOS 12 or later, Apple silicon and Intel. Nothing is deleted without your OK.

Frequently asked questions

Can I delete every old Android API?
Only after checking active projects and emulator tests. The latest platform is not necessarily a replacement for a project’s configured compile SDK.
Why did deleting an emulator free less than expected?
Its system image and other SDK packages may still be installed. Check SDK Manager separately and retain anything needed by other virtual devices.