Skip to content

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:

Terminal window
wsl --list --all --verbose

This shows all installed distros. For each one, run:

Terminal window
wsl --unregister <DistroName>

Example:

Terminal window
wsl --unregister Ubuntu

Repeat for all listed distros.


In the same PowerShell (admin):

Terminal window
dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

These commands turn off the core WSL components.


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

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:

Terminal window
dism.exe /online /disable-feature /featurename:Microsoft-Hyper-V-All /norestart

Then reboot your machine.


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.