Uninstall WSL (Windows Subsystem for Linux) from your Windows 11 system
To completely uninstall WSL (Windows Subsystem for Linux) from your Windows 11 system, follow these steps in order. This will ensure all related distributions, features, and files are removed cleanly.
✅ 1. Unregister and Remove Installed Linux Distros
Section titled “✅ 1. Unregister and Remove Installed Linux Distros”Open PowerShell as Administrator and run:
wsl --list --all --verbose
This shows all installed distros. For each one, run:
wsl --unregister <DistroName>
Example:
wsl --unregister Ubuntu
Repeat for all listed distros.
✅ 2. Disable WSL Optional Features
Section titled “✅ 2. Disable WSL Optional Features”In the same PowerShell (admin):
dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestartdism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
These commands turn off the core WSL components.
✅ 3. Remove WSL-Related Packages (Optional)
Section titled “✅ 3. Remove WSL-Related Packages (Optional)”If WSL was installed via the Microsoft Store (e.g., WSL2 or Ubuntu), you can remove it like this:
- Open Settings → Apps → Installed Apps
- Search for:
- “WSL”
- “Ubuntu” or other distros
- “Windows Subsystem for Linux Update”
- Click Uninstall on each
✅ 4. Delete WSL Files and Folders
Section titled “✅ 4. Delete WSL Files and Folders”Manually clean up leftover WSL files:
- Press
Win + R
→ type:%USERPROFILE%\AppData\Local\Packages
- Look for folders named like:
CanonicalGroupLimited...
(Ubuntu)SUSE...
,Debian...
, etc.
- Delete those folders if present
Also check %LOCALAPPDATA%\Docker
and %APPDATA%\Docker
to remove any remaining Docker/WSL files.
✅ 5. (Optional) Disable Hyper-V and Cleanup VM Stuff
Section titled “✅ 5. (Optional) Disable Hyper-V and Cleanup VM Stuff”If Docker installed Hyper-V and you don’t need it:
dism.exe /online /disable-feature /featurename:Microsoft-Hyper-V-All /norestart
Then reboot your machine.
✅ 6. Reboot
Section titled “✅ 6. Reboot”After everything, restart your PC to finalize removal.
Let me know if you also want to clean up networking leftovers like vEthernet (WSL)
adapters or DockerNAT interfaces.