How to Shrink Your Massive WSL Virtual Disk
If you use Windows Subsystem for Linux (WSL2), you may have noticed a large file on your system drive: C:\Users\<YourUser>\AppData\Local\Packages\<YourDistroFolder>\LocalState\ext4.vhdx This is a virtual hard disk that stores the entire Linux filesystem. It expands automatically as you install packages and create files, but it does not shrink automatically when files are deleted. Over time, this can leave you with a multi-gigabyte file containing mostly unused space. Here’s how to safely compact it and reclaim that space. ...