Wsl Uninstall =link=
Get-AppxPackage MicrosoftCorporationII.WindowsSubsystemForLinux | Remove-AppxPackage Summary of wsl commands List Installed Distros wsl -l -v Shutdown WSL wsl --shutdown Remove Data & Distro wsl --unregister Uninstall WSL App wsl --uninstall If you're still having trouble, please tell me:
Using command-line tools ensures that all instances are unregistered and data is purged from your AppData directory. 1. Stop all WSL instances
Best for pasting into a chat channel to help a colleague. wsl uninstall
Reboot your PC, then run in PowerShell:
Open PowerShell as Administrator and run: winget uninstall "Windows Subsystem for Linux" Get-AppxPackage MicrosoftCorporationII
are you trying to remove (e.g., Ubuntu, Kali)? Are you seeing any specific error codes ? Are you running Windows 10 or 11 ?
| Issue | Solution | |-------|----------| | “WSL is still listed in wsl -l after unregister” | Run wsl --shutdown , then unregister again. | | “Cannot uninstall Virtual Machine Platform – other features depend on it” | Leave it enabled if you use Hyper-V, WSA (Android), or Docker Desktop. | | Large disk space still used | Manually delete the .vhdx files from %LOCALAPPDATA%\Packages\...\LocalState . | Reboot your PC, then run in PowerShell: Open
Here are a few options for a post about uninstalling WSL, tailored to different platforms.
wsl -l -v
⚠️ This permanently deletes the filesystem and data for that distro. Make sure to back up your files first! 💾