Created
August 25, 2022 17:46
-
-
Save harmandeep-singh/0e180e445d9cb9e42ae2219116d9abb5 to your computer and use it in GitHub Desktop.
WSL 2 disk space Cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run powershell as admin | |
Go inside "wsl2" cmd | |
install ncdu : sudo apt-get install ncdu | |
run : sudo ncdu --exclude mnt //--exclude mnt Ignore windows drive like - c: d: etc... | |
wsl --shudown | |
Optimize-VHD -Path %userprofile%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx -Mode Full | |
Optimize-VHD -Path %userprofile%\AppData\Local\Docker\wsl\data\ext4.vhdx -Mode Full | |
// Use Windirstat like program to find .vhdx file , generally those are large in size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment