Skip to content

Why WSL can show free space while Windows is full

Troubleshooting guides · Storage & drives

Linux says there’s room for another build but Windows reports a full drive. WSL 2 measures the Linux filesystem inside a virtual disk. Start by finding which distribution owns the disk and which Windows volume holds it.

Windows with WSL. Virtual disk guidance applies to WSL 2 user distributions.

From regular PowerShell under the affected Windows account, list distributions and their WSL versions. The VERSION column shows whether the distribution uses WSL 1 or 2. wsl --version reports the installed WSL package version where available. Check wsl --help for the capabilities your local executable exposes and use wsl --status for general configuration. If a required flag is absent, use only a documented method supported by your version.

PowerShell · Read-only check
wsl --list --verbose
wsl --version
wsl --help
wsl --status

Runs only when you paste it into your terminal and press Enter.

For a personal WSL 2 distribution with a standard ext4.vhdx, replace <distribution-name> with the exact name from the list in Microsoft’s read-only PowerShell lookup. In a single-quoted PowerShell string, double any apostrophe in the name.

PowerShell · Read-only check
(Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Where-Object { $_.GetValue("DistributionName") -eq '<distribution-name>' }).GetValue("BasePath") + "\ext4.vhdx"

Runs only when you paste it into your terminal and press Enter.

The registry supplies the registered directory and the command appends a conventional filename. Check the result against the actual file and any import records. An imported or custom disk may use another name. If you cannot confirm ownership, stop. In Explorer, read Properties for that one file and record Size, Size on disk if available, and the hosting Windows volume. Keep the path private. Microsoft’s VHDX lookup

WSL 1 has a different storage model. Skip the virtual disk comparison for that version. For Docker Desktop’s files, use Docker storage checks. Whether you see a separate Docker data distribution can depend on how Desktop was provisioned. A Docker command launched inside your distro can still be using Desktop’s engine. WSL versions · Docker Desktop WSL backend

In the selected, running distribution, check its root filesystem and the workspace path that failed. Starting a stopped distro can launch services and write data, so keep that separate from a quiet baseline.

Linux shell in the selected WSL distribution · Read-only check
df -k /
df -k .

Runs only when you paste it into your terminal and press Enter.

Read the mount points before comparing. df -k reports 1,024-byte blocks. A project under /mnt/c may be using Windows storage directly. Record guest capacity and available space separately. A large guest capacity can exceed the space currently available to grow the VHDX on Windows. Compare host before and after with the Windows volume check. Microsoft’s WSL disk space guide

Illustrative WSL 2 storage after guest cleanup
Windows host volume4 GiB free before and after
VHDX file on that volume45 GiB allocated on the host before and after. Virtual capacity 64 GiB.
Linux guest filesystem inside the VHDXGuest available space rises from 20 to 30 GiB.

The guest can reuse the space, and the Windows drive still has its original shortfall. Use the storage worksheet for host readings and record guest readings beside them.

Choose the next action for the layer that is full

Section titled “Choose the next action for the layer that is full”
  • Guest filesystem full. Use Linux cleanup guidance and verify the same guest mount. Keep uncommitted work, credentials, databases and unique artifacts. Check df -i . if file creation fails despite available bytes.

  • Guest space returned but Windows space stayed flat. Recheck the same Windows volume and the same VHDX’s Size on disk, when available. Note concurrent downloads or rebuilds. If the guest task now works and the host has enough headroom, reuse the guest space. If the Windows task still falls short, use Windows cleanup or evaluate relocation to a different volume. Treat compaction as a separate operation that needs current product guidance and validation for your setup.

  • Virtual capacity is the limit. If Windows has room for future growth, back up the distro and plan downtime for all WSL instances and dependent apps. Microsoft documents wsl --shutdown then wsl --manage NAME --resize SIZE for expansion on WSL 2.5 and newer. Use the exact distro name and a supported whole-number size above the current virtual capacity. Verify the guest’s capacity with df -k / when it restarts and recheck Windows headroom. Larger virtual capacity enables growth. Host free space must still be measured separately. Microsoft’s WSL expansion procedure

  • Relocation is needed. Stop guest writers and prepare a recovery copy. Export the exact distro with wsl --export NAME BACKUP_TAR, then test the archive under a different name in a new directory with wsl --import TEST_NAME DESTINATION BACKUP_TAR --version 2. Quote paths with spaces, keep the export private, and allow space for both copies. Back up external mounts separately. Verify the import’s files, user and workload. The original stays on its source volume during this test. Microsoft’s WSL command reference

    For a confirmed personal WSL 2 distro, if the installed help lists --manage with --move, plan the actual move separately. Verify an unused destination on the intended volume with room for the disk and growth. Save work, stop the selected distro with wsl --terminate NAME and keep dependent apps closed. Use wsl --manage NAME --move DESTINATION only for that exact distro and destination. Stop on errors and preserve the export. Afterward, confirm the new registered location, start the distro and retry the task. Remeasure both Windows volumes with their original counters. Microsoft’s WSL command help source

  • Owner unclear, managed Docker data, or mount errors. Leave the disk file in place and consult the owning product’s support. Unregistering deletes distribution data. Keep generic compaction, disk edits and trim chains outside this procedure. Microsoft’s WSL command reference