How to Completely Remove WSL from Windows 11 Windows Subsystem for Linux (WSL) is a powerful tool for developers, allowing them to run a Linux environment directly on Windows. However, there may come a time when you need to remove it. Perhaps you are troubleshooting a corrupted installation, freeing up disk space, or simply no longer need a Linux environment on your PC. Removing WSL isn't as simple as uninstalling one app; it involves removing specific Linux distributions, the subsystem itself, and optional Windows features. Here is a step-by-step guide on how to completely remove WSL from Windows 11.
Step 1: Uninstall Linux Distributions Before removing the underlying subsystem, you must remove any installed Linux distributions (like Ubuntu, Debian, or Kali Linux). If you skip this step, the distro files may remain on your drive, taking up space.
Open the Settings app (Win + I). Navigate to Apps > Installed apps . Use the search bar or scroll to find your Linux distributions (e.g., "Ubuntu"). Click the three dots next to the app name and select Uninstall . Confirm the action.
Repeat this process for every Linux distribution you have installed. Step 2: Uninstall "Windows Subsystem for Linux" App In Windows 11, WSL is often distributed as a Microsoft Store application. You should uninstall this wrapper to ensure a clean removal. remove wsl from windows 11
Go back to Settings > Apps > Installed apps . Search for Windows Subsystem for Linux . Click the three dots and select Uninstall .
Step 3: Disable WSL Features via Settings Even after uninstalling the apps, the Windows "Optional Features" that power WSL might still be active. Disabling these stops the background processes and frees up system resources.
Open Settings and go to System > Optional features . Scroll down to the bottom and click on More Windows features (highlighted in blue text). A "Windows Features" dialog box will appear. Look through the list and uncheck the following boxes: How to Completely Remove WSL from Windows 11
Virtual Machine Platform Windows Subsystem for Linux
Click OK . Windows will search for required files and apply the changes. You will be prompted to Restart your PC . Do this now.
Step 4: Clean Up Remaining Disk Space (Optional but Recommended) WSL uses virtual hard disk (VHDX) files to store Linux data. Sometimes, these files linger even after uninstallation. Additionally, if you want to wipe all traces of your Linux sessions, you should delete the associated folders. Warning: The following step involves deleting system files. Proceed with caution. Removing WSL isn't as simple as uninstalling one
Open File Explorer. Navigate to the following path in your User profile folder: C:\Users\%USERNAME%\AppData\Local\Packages\ Look for folders related to the distributions you uninstalled. They are usually named like:
CanonicalGroupLimited.Ubuntu... KaliLinux...