How to reclaim the space in WSL after folder deletion
Deleting files inside WSL is like throwing trash away inside a house—the house (the .vhdx file) doesn't actually get smaller on the outside until you "move the walls back in."
To reclaim that space on your C: drive immediately, follow these steps.
In powershell run the below command
wsl --shutdown
Restart your windows system.
Run below command , replace the DistroName with your WSL Distro Name.
wsl --manage <DistroName> --set-sparse true
How to find the Distro Name:
Run the below command in Powershell
wsl -l -v
Normally ubuntu will be the distro name.
Comments
Post a Comment