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

Popular posts from this blog

How to use Grep Command

How to connect to postgres database in activepieces