Caches, Docker and Android

Package caches, Docker and the Android SDK

Every package manager keeps a copy of everything it ever downloaded. DevSweeper measures each cache, counts only the space removal actually frees, and clears it with the tool's own command where there is one.

Free to scan. Seven days of cleaning free, no card. macOS 26 or later.

CacheWhereHow it is cleared
npm~/.npm/_cacachenpm cache clean --force
npx~/.npm/_npxTrash, skipping packages a program is running from
pnpmthe store pnpm reportspnpm store prune
yarn (Yarn 1)~/Library/Caches/Yarnyarn cache clean
yarn (Yarn 2 and later)~/.yarn/berry/cacheTrash
bun~/.bun/install/cachebun pm cache rm
uvthe cache uv reportsuv cache clean, when no uv process is running
pip~/Library/Caches/pippip3 cache purge
CocoaPods~/Library/Caches/CocoaPodspod cache clean --all
SwiftPM~/Library/Caches/org.swift.swiftpmTrash, with Xcode quit
pub (Dart, Flutter)~/.pub-cachedart pub cache clean --force
Homebrewthe cache brew reportsbrew cleanup --prune=all
Gradle~/.gradle/cachesTrash, with Android Studio quit
Other app caches~/Library/Caches, folders of 1 GB or moreTrash, with the app quit

Caches

When a tool isn't installed any more, its cache goes to the Trash instead. brew cleanup --prune=all also removes old versions of installed formulae, and the preview says so.

Sizes leave out blocks shared through APFS clones. If uv's cache is cloned into your virtualenvs, DevSweeper reports the space clearing it would actually free, not the size of the folder.

MCP servers and other tools started with npx run from ~/.npm/_npx. DevSweeper leaves out the packages something is running from, and checks again right before cleaning.

Any other folder in ~/Library/Caches of 1 GB or more is listed too, named after its app when that app is installed, and cleaned only while the app is quit. Apple's own folders are never listed.

Docker

With Docker running, DevSweeper reads docker system df and shows:

  • Stopped containers and build cache, cleared with docker system prune --force;
  • Unused images, cleared with docker image prune --all --force;
  • Unused volumes, review only. Volumes hold data, and DevSweeper never removes them.

Docker Desktop's disk image gives space back to macOS gradually, so free space can take a while to catch up.

Android SDK

In ~/Library/Android/sdk, older NDK and build-tools versions, and system images no virtual device uses. In ~/.android/avd, virtual devices you haven't used within the window. They are removed with sdkmanager --uninstall and avdmanager delete avd, with Android Studio quit.

Doing it by hand

To prune Docker yourself and get the disk image to give the space back, see how to clear the Docker cache on a Mac.

To clear npm, pnpm, Yarn and Bun caches from the terminal, see how to delete node_modules and clear package-manager caches.

More of what DevSweeper finds