Wsl Distro Location ((new)) 〈2025〉
C:\Users\JohnSmith\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx Method 1: Via PowerShell (Easiest) Open PowerShell as Administrator and run:
If you’ve installed WSL (Windows Subsystem for Linux) and started filling up your $HOME directory with projects, you might suddenly realize your C: drive is shrinking. By default, WSL stores its virtual hard disks ( .vhdx files) on your Windows drive.
Here is exactly where to find them and how to move them. For a distro installed from the Microsoft Store (like Ubuntu, Debian, or Kali), the default path is: wsl distro location
C:\Users\[YourUserName]\AppData\Local\Packages\[DistroPackageName]\LocalState\ext4.vhdx
Get-ChildItem "C:\Users\$env:USERNAME\AppData\Local\Packages" -Filter "*ext4.vhdx" -Recurse -ErrorAction SilentlyContinue Inside your WSL distro, run: For a distro installed from the Microsoft Store
# Find the block device df -h / wsl.exe --list --verbose
# In Windows PowerShell (Admin) Optimize-VHD -Path D:\wsl\Ubuntu\ext4.vhdx -Mode Full Now you can keep your C: drive breathing room while your Linux environment lives happily on a larger SSD or HDD. Have questions or another WSL tip? Drop a comment below! Where is my WSL Distro Actually Stored
Where is my WSL Distro Actually Stored? (And How to Move It)