Recommended Free Tools
To shrink a WSL virtual disk and reclaim Windows storage, first remove only unneeded data inside the Linux distribution, then shut WSL down and compact the correct VHDX if it is not already returning storage through sparse-file behavior. Deleting Linux files frees space inside the virtual disk, but does not necessarily reduce the space the VHDX occupies on Windows. Compaction can reduce that physical allocation; it does not necessarily change the disk’s maximum virtual capacity.
What “shrink” means for a WSL virtual disk
A WSL 2 distribution stores its Linux filesystem in an ext4-formatted VHDX file on Windows. Three different measurements matter:
As an Amazon Associate I earn from qualifying purchases.
- Linux free space: space available inside the distribution’s filesystem.
- Windows physical allocation: the space the VHDX currently occupies on the host drive, shown as “Size on disk” in File Explorer.
- Maximum virtual capacity: the upper limit the virtual disk can grow to. Microsoft’s current WSL disk-space guide gives 1 TB as the default for current WSL VHDs and notes historical defaults of 512 GB and 256 GB for earlier releases. These are capacity limits, not the amount of Windows storage the file consumes. Microsoft’s WSL disk-space guide
Removing files can increase free space inside Linux without immediately reducing the VHDX’s physical allocation. Host-side compaction attempts to reclaim blocks no longer needed by the filesystem. It is not the same as reducing the disk’s maximum virtual capacity.
Check whether Windows storage is actually being held
Compare Linux free space with the VHDX allocation
- Open the target distribution and run
df -h /to check filesystem use and available space inside Linux. Microsoft documents checking disk space from WSL in its disk-space guide. - On Windows, inspect the target VHDX’s file properties and compare Size on disk with its displayed file size. The logical file size alone does not tell you how many host-drive bytes are allocated.
If Linux has ample free space but Windows still allocates substantial space to the VHDX, compaction may help—unless sparse-file behavior is already returning blocks to Windows.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Check sparse-file status before compacting
Windows supports sparse files, which can have less physical allocation than their logical file size. Microsoft documents sparse-file behavior and the fsutil sparse command, but sparse behavior in WSL configurations is version- and configuration-dependent. A WSL community discussion also describes sparse behavior, but it is not a universal official procedure. Check the actual VHDX status and its “Size on disk” rather than assuming every distribution needs manual compaction. Microsoft’s fsutil sparse documentation · WSL community discussion of sparse VHD behavior
Safely prepare the distribution
Clean up from inside Linux
Remove only files you recognize as unnecessary, using the package manager or application-specific cleanup process appropriate to your distribution and workload. There is no single safe cleanup command for every WSL distribution. Deleting files frees guest filesystem space, but does not by itself guarantee a smaller Windows-side VHDX.
Rank #2
- MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
- SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
- ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
- ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
- HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³
Export important data and stop WSL
- If the distribution contains important data, export it before maintenance. WSL supports
wsl --export; its--vhdoption exports a VHDX for WSL 2. See Microsoft’s WSL basic commands documentation. - In Windows, run
wsl --shutdownto stop running WSL instances before host-side maintenance. This is part of Microsoft’s documented manual VHD maintenance guidance. - Identify the VHDX belonging to the intended distribution. Microsoft’s disk-space guide documents a PowerShell registry lookup that returns the distribution’s base path and
ext4.vhdx.
Do not edit, move, or open WSL files under AppData with Windows tools or editors. Microsoft warns that doing so can corrupt a distribution. Use WSL’s supported interfaces and take an export backup when the data matters.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchChoose a compaction method
Microsoft documents both DiskPart’s compact vdisk command and Hyper-V’s Optimize-VHD cmdlet for compacting virtual disks. Neither source establishes one universal shrink sequence for every WSL VHDX, especially where sparse behavior differs. Use a method only when the target VHDX and its attachment state meet that tool’s requirements.
Rank #3
- MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
- SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
- ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
- ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
- HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³
| Method | Availability | Required disk state | What it does |
|---|---|---|---|
DiskPart compact vdisk |
DiskPart is available in Windows; see Microsoft’s command reference. | The dynamically expanding disk must be detached or attached read-only. | Reduces the physical size of a dynamically expanding VHD file; it does not necessarily change maximum virtual capacity. |
Hyper-V Optimize-VHD |
Requires the Hyper-V PowerShell module to be available; see Microsoft’s cmdlet reference. | The VHD must be detached or read-only. | Its Full mode scans for zero blocks and reclaims unused blocks. A successful operation can still leave the file size unchanged if no optimization is possible. |
Follow the selected tool’s Microsoft documentation for its exact syntax and state requirements. Do not assume a successful command means Windows must report a smaller allocation, or treat a capacity-resize command as a shrink operation.
Verify the result—and know when not to repeat it
After maintenance, compare the VHDX’s “Size on disk” with the value recorded before the operation. If it falls, Windows has reclaimed physical allocation. If it does not, the operation may have found no reclaimable blocks, sparse behavior may already be releasing allocation, or the disk may not have been in a state that allowed the intended operation. Microsoft explicitly notes that Optimize-VHD can succeed without reducing file size when no optimization is possible. Optimize-VHD documentation
Rank #4
- Note: Magsafe is not available in this version
- High-speed Data Transfer: Lexar external SSD ES3 supports USB 3.2 Gen 2 up to 1050MB/s read and 1000MB/s write to transfer files fast for more efficient work. (Performance may be lower if not supporting USB 3.2 Gen 2 on Mac and other systems)
- Wide Compatibility: Lexar Portable SSD ES3 compatibility with iPhone 17 series (Not supported on iPhone 14 and older models), Android mobile devices, laptops, cameras, Xbox X|S, PS4, PS5, gaming console, and more
- On The Go: Lexar external solid state drive ES3's thin, stylish, and durable design, weighs 42g and is only 10.5mm thick, making it smaller than a card and easily fits in your pocket. It comes with a Type-C cable for plug-and-play convenience
- Data Safety First: Lexar SSD ES3 includes Lexar DataShieldTM 256-bit AES encryption software to protect files
Do not confuse shrinking with resizing
Microsoft’s WSL disk-space documentation says wsl --manage --resize is available in WSL 2.5 and later for expanding a virtual disk. That documentation does not describe it as a general shrink command. Do not use it on the assumption that it will reclaim Windows storage by shrinking a VHDX. WSL disk-space documentation
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Best Value
- Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
- Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
- Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
- Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
- Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




