How to Remove WSL: A Complete Guide to Uninstalling the Windows Subsystem for Linux Whether you’re looking to free up disk space, troubleshooting a corrupted environment, or simply no longer need Linux on your Windows machine, uninstalling the Windows Subsystem for Linux (WSL) is a straightforward process. However, because WSL consists of multiple layers—the Linux distributions themselves and the underlying Windows features—a "clean" removal requires a few specific steps. Here is how to completely remove WSL from your system. Step 1: Back Up Your Data (Optional) Before you delete anything, remember that uninstalling a distribution will permanently delete all files stored within that Linux environment. If you have important code or configurations, export your distribution first: Open PowerShell. Run: wsl --export C:\backup\distro_backup.tar Step 2: Uninstall Linux Distributions The easiest way to start is by removing the specific Linux flavors (like Ubuntu, Debian, or Kali) you installed. Method A: Using the Settings App (Easiest) Open Settings on Windows. Go to Apps > Installed Apps (or Apps & Features ). Search for your distribution (e.g., "Ubuntu"). Click the three dots (or the app entry) and select Uninstall . Method B: Using Terminal (Advanced) If the app doesn't appear in the settings menu, you can "unregister" it via the command line: Open PowerShell as Administrator. Type wsl --list to see your installed distros. Type wsl --unregister (e.g., wsl --unregister Ubuntu ). Note: This instantly deletes the virtual hard disk associated with that distro. Step 3: Remove the WSL Kernel and Tools Even after deleting the distributions, the WSL "engine" remains on your computer. Go back to Settings > Apps > Installed Apps . Search for "Windows Subsystem for Linux" . If you see "Windows Subsystem for Linux" or "WSL Update" in the list, Uninstall them. Step 4: Disable WSL Windows Features To fully revert your system to its pre-WSL state, you need to turn off the optional Windows features that allow Linux to run. Press the Windows Key and type "Turn Windows features on or off" . Open that result. Scroll down and uncheck the following: Windows Subsystem for Linux Virtual Machine Platform (Note: Only uncheck this if you don't use other virtual machines like BlueStacks or Hyper-V). Click OK . Restart your computer to apply the changes. Step 5: Clean Up Residual Files (The Pro Touch) Sometimes, small configuration folders are left behind. To ensure a 100% clean slate: Open File Explorer. Navigate to %USERPROFILE% . Look for a .wslconfig file or a .bash_history file if they exist, and delete them. Check C:\ProgramData for any remaining WSL folders. Why would you want to remove WSL? Storage Space: WSL 2 uses virtual hard disks ( .vhdx ) that can grow quite large over time. System Resources: Disabling the Virtual Machine Platform can sometimes improve performance on lower-end hardware. Fresh Start: If your WSL environment is "broken" beyond repair, it’s often faster to uninstall and reinstall than to troubleshoot complex Linux permissions.
Here’s a clear, step-by-step write-up on how to remove WSL (Windows Subsystem for Linux) from your Windows 10 or Windows 11 machine.
How to Remove WSL from Windows Removing WSL completely involves two main steps:
Uninstalling individual Linux distributions (like Ubuntu, Debian, etc.) Removing the WSL feature itself from Windows how to remove wsl
Optionally, you can also remove the WSL2 Linux kernel update package.
Step 1: Uninstall Linux Distributions Each WSL distro is a separate app. You can uninstall them like any other app. Via Settings (Windows 10/11):
Go to Settings > Apps > Installed apps (or Apps & features on older builds) Search for your distribution (e.g., “Ubuntu”, “Debian”) Click the three dots (⋮) and select Uninstall How to Remove WSL: A Complete Guide to
Via PowerShell (faster): wsl --list --verbose # see installed distros and their names wsl --unregister <distro_name>
Example: wsl --unregister Ubuntu
⚠️ This removes all files, settings, and data inside that Linux distribution. Step 1: Back Up Your Data (Optional) Before
Step 2: Remove the WSL Windows Feature Uninstalling distros does not disable the underlying WSL feature. Option A: Using Windows Features GUI
Press Windows + R , type optionalfeatures , press Enter Scroll to Windows Subsystem for Linux Uncheck the box → Click OK → Restart when prompted