Skip to content

Find what is filling your developer drive

Troubleshooting guides · Storage & drives

A build or package restore can fail even with free space on the drive holding your repository. Find the volume the tool is writing to, then check what the owning tool can safely regenerate.

Windows, macOS and Linux. Run the package lookup from the same environment as the affected build.

Read the error for the path and operation. A package cache, temp directory, toolchain, project dependency tree and build output can each live on a different volume. Use the same user, shell, interpreter and project configuration as the failing command. For work inside Docker or WSL, first establish whether the write lands in the guest, a mounted host directory or a managed disk.

Record free bytes on the affected volume before changing anything. Use the same Windows, macOS or Linux readout after the change. Also record the task’s space requirement if available. A partially downloaded package or an unpack step can need working space beyond the final install size.

Run the read-only lookup for the tool you use. Paths and package names can reveal projects and account names, so keep the output private.

Package and build storage lookups
ToolWhere to lookData to distinguish
npmnpm config get cacheDownload cache, project dependencies and npm exec cache can have different roles. Check lockfiles and local changes.
pippython -m pip cache info using the project’s interpreterHTTP and wheel caches differ from installed packages and virtual environments. Check what you can fetch again.
NuGetdotnet nuget locals all —listHTTP cache, global packages, temporary files and plugin caches are separate. A restore can need private feeds and credentials.
GradleCheck GRADLE_USER_HOME and the project’s Gradle configurationUser Home holds shared caches and wrapper downloads. Project caches, build outputs and SDKs serve different tasks.

Follow the owning tool’s documentation for your version. npm cache verify can perform maintenance, so leave it out of a read-only baseline. Gradle manages cache retention in User Home and can reuse data across projects. Keep wrapper versions and offline dependencies while you check who uses the cache. npm cache · pip cache · NuGet locations · Gradle directory layout

Sort the finding into downloads you can fetch, build outputs you can regenerate, installed environments or toolchains you still need, and project data you must preserve. Check lockfiles, exact tool versions, feed access, offline needs and uncommitted work. Keep build artifacts that are expensive or impossible to reproduce. Use the SDK manager or vendor removal workflow only after checking all dependent projects. Microsoft’s .NET SDK and runtime removal guidance

If you work offline, have lost registry access, or rely on packages that have disappeared from a feed, keep the only usable copy. Save local changes to dependencies or generated files and back up unpublished packages, signing material, and release output before choosing a target. A lockfile records what a build needs. Check that those exact inputs still exist.

  • npm exec cache. If your npm version exposes the cache npx subcommands, run npm cache npx ls and npm cache npx info KEY with the exact listed key. After confirming the cached tool and version are fetchable and no process needs the entry, run npm cache npx rm KEY. Repeat the list to confirm that key is gone. Future npm exec runs may download the tool again. The project’s node_modules and the main download cache have their own lifecycles. npm cache commands
  • pip wheel cache. With the affected project’s interpreter, run python -m pip cache list PACKAGE and review the listed wheels before using python -m pip cache remove PACKAGE. Use one package name, without a wildcard. This can remove multiple cached wheel versions for that package. Keep locally built wheels you cannot reproduce and confirm the index and build inputs are reachable. Repeat the list. HTTP cache entries and installed virtual environments are separate. pip cache commands
  • NuGet HTTP cache. Run dotnet nuget locals http-cache --list under the affected account with the .NET SDK. If you can reach the required feeds, active restores have finished, and users of that cache are ready to re-download, run dotnet nuget locals http-cache --clear. Check the command result and retry the original restore. Keep the separate global package cache if it contains a version you cannot fetch again. NuGet locals

Stop on permission or partial-removal errors and record what happened. If a tool cannot isolate the reviewed target, choose a different owner.

  • Gradle. In a trusted checkout, choose the actual module and verify its configured build directory and any custom clean task dependencies. If it uses the Base plugin’s clean task and the directory holds disposable output, run ./gradlew :app:clean on macOS/Linux or .\gradlew.bat :app:clean in Windows PowerShell for the example module app. The wrapper can download Gradle and run project build logic. Check wrapper availability and dependency access before cleaning. User Home contains shared downloads and has its own retention rules. Verify the selected output directory and rebuild only when enough space remains. Gradle Base plugin · Gradle User Home
  • .NET build output. Match the project and build configuration, then review its referenced projects and any custom clean targets. For a disposable Release build of the example project, use dotnet clean "src/App/App.csproj" --configuration Release. It cleans intermediate and final build outputs for that build. Copy out any unique or published artifacts beforehand. Check the affected output directories and rerun the original build after measuring. dotnet clean

Remove an unused SDK, runtime or test device

Section titled “Remove an unused SDK, runtime or test device”
  • .NET SDKs and runtimes on Windows. Use dotnet --list-sdks and dotnet --list-runtimes from the affected environment. Check project global.json selections, deployed app runtime requirements, and the installer that owns the version. Remove one confirmed unused version through Settings → Apps → Installed apps if it was installed separately, or through the owning Visual Studio Installer for a Visual Studio component. Have a matching installer available if offline or the version is difficult to obtain. Repeat the version lists and test the projects or apps that still rely on .NET. Microsoft’s removal guidance
  • Android SDK and virtual devices. Open Tools → SDK Manager and check the SDK location against the affected project. Check project SDK requirements and each retained virtual device’s system image before clearing a single unused package checkbox and reviewing Apply. For a disposable stopped device, use Device Manager → Virtual → device menu → Delete. That removes the device and its local data or snapshots. Export needed app data first and keep any system image other devices use. Recheck the SDK package list or device list, and launch a retained device or rebuild as appropriate. Reinstallation can require network access. Android SDK Manager · Android Device Manager
  • Xcode simulator runtimes. In Xcode → Settings → Components, select the exact unused runtime. Confirm no retained device or test matrix needs that OS version and save unique simulator data separately. Use the runtime’s Delete control, shown as a minus button or available through its information button, depending on Xcode version. Review the confirmation before deleting. Check that the runtime is gone and launch a retained simulator. Keep access to the matching download if you may need it later. Apple’s runtime instructions · Xcode components

Measure the result and retry the same task

Section titled “Measure the result and retry the same task”

Review one exact action in the owning tool. Record the estimated recovery as unknown unless you have a defensible basis. Afterward, read the same host volume and record the change in the storage worksheet. Retry the original build or restore in the same environment. Check free space once more if the task repopulates the cache. If it immediately fails on space again, compare where it staged files with the location you just cleaned.