Windows Subsystem for Linux (WSL) is one of the most useful features available in Windows 11 for developers, IT professionals, and users who need a Linux environment without installing a separate operating system. With WSL, you can run Linux distributions such as Ubuntu, Debian, Kali Linux, openSUSE, and Fedora directly on Windows, making it easy to use Linux commands, programming tools, and development environments.
Although WSL is extremely useful, many users eventually decide to remove it. You may no longer need Linux for development, want to free up storage space, troubleshoot system issues, or simply prefer a cleaner Windows installation. Fortunately, uninstalling WSL is straightforward, and Windows provides several methods depending on whether you want to remove only a Linux distribution or completely uninstall every WSL component.
This guide explains the safest ways to uninstall WSL in Windows 11. You’ll learn how to remove installed Linux distributions, unregister WSL instances, disable Windows features, delete leftover files, and verify that WSL has been completely removed. Whether you’re a beginner or an advanced user, these methods will help you uninstall WSL safely without affecting your Windows installation.
What Is Windows Subsystem for Linux (WSL)?
Windows Subsystem for Linux (WSL) is a Microsoft feature that allows Linux distributions to run natively within Windows. Instead of installing Linux in a virtual machine or creating a dual-boot setup, WSL lets users access Linux tools directly from Windows.
Developers commonly use WSL for programming, scripting, Docker containers, server management, Git, Python, Node.js, Java, and many other development tasks. Windows 11 supports both WSL 1 and WSL 2, with WSL 2 providing better compatibility through a lightweight virtual machine.
If you no longer need these Linux capabilities, uninstalling WSL can recover disk space and simplify your Windows environment.
Before You Remove WSL
Before uninstalling WSL, there are a few important things to keep in mind.
Any files stored inside your Linux distribution may be permanently deleted if you unregister or uninstall it. If you have programming projects, scripts, databases, or configuration files stored inside Linux, make sure to back them up before proceeding.
You should also close every Linux terminal window and exit applications such as Docker Desktop that rely on WSL. Removing WSL while Linux applications are running may interrupt active processes.
Finally, decide whether you only want to remove one Linux distribution or completely uninstall the Windows Subsystem for Linux feature. The methods below cover both situations.
Method 1: Uninstall the Linux Distribution from Settings
The easiest method removes only the Linux distribution while leaving WSL installed. This is useful if you no longer need Ubuntu, Debian, Kali Linux, or another distribution but may install a different one later.
Open Settings by pressing Windows + I.
Select Apps and then open Installed apps.
Scroll through the application list until you find your installed Linux distribution.
Click the three-dot menu beside the distribution and select Uninstall.
Confirm the uninstall when prompted.
Windows removes the selected Linux distribution from your computer while keeping the WSL platform available for future installations.
Method 2: Unregister a Linux Distribution Using Command Prompt
If you want to permanently delete a Linux distribution and all of its stored data, unregistering it is the preferred method.
Open Command Prompt as Administrator.
Display the installed Linux distributions by running:
wsl --list
You can also use:
wsl -l
A typical output might look like this:
Ubuntu
Debian
kali-linux
To remove Ubuntu, run:
wsl --unregister Ubuntu
For Debian:
wsl --unregister Debian
For Kali Linux:
wsl --unregister kali-linux
Once completed, Windows permanently removes that Linux installation along with every file stored inside it.
Method 3: Remove All Installed Linux Distributions
If multiple Linux distributions are installed, repeat the unregister command for each one.
First, list them:
wsl --list
Then unregister every distribution individually:
wsl --unregister Ubuntu
wsl --unregister Debian
wsl --unregister kali-linux
Continue until no distributions remain.
Afterward, verify by running:
wsl --list
If no distributions are installed, the command will indicate that none are available.
Method 4: Disable Windows Subsystem for Linux
Removing Linux distributions does not uninstall WSL itself. If you no longer plan to use WSL, disable the Windows feature.
Press Windows + R.
Type:
optionalfeatures
Press Enter.
The Windows Features window opens.
Locate Windows Subsystem for Linux.
Clear its checkbox.
Click OK.
Windows applies the changes and asks you to restart your PC.
After restarting, WSL is disabled.
Method 5: Disable Virtual Machine Platform
WSL 2 relies on the Virtual Machine Platform feature. Removing this feature completely disables WSL 2 support.
Open the Windows Features window again.
Find Virtual Machine Platform.
Uncheck the option.
Click OK.
Restart your computer.
After rebooting, Windows removes the virtualization component used by WSL 2.
Method 6: Disable WSL Using PowerShell
PowerShell offers a quick command for disabling WSL without opening Windows Features.
Launch PowerShell as Administrator.
Run:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Windows processes the command and may request a restart.
Restart your PC to complete the removal.
This method is particularly useful for administrators managing multiple computers.
Method 7: Remove WSL Using DISM
Deployment Image Servicing and Management (DISM) can also disable WSL.
Open Command Prompt as Administrator.
Run:
dism /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux
Allow the command to finish.
Restart Windows.
DISM is commonly used by IT professionals because it works consistently across Windows installations.
Method 8: Delete Remaining WSL Files
Even after uninstalling WSL, some files may remain on your system.
Open Run by pressing Windows + R.
Type:
%LOCALAPPDATA%
Press Enter.
Browse to the Packages folder.
Locate folders associated with Linux distributions such as Ubuntu, Debian, or Kali Linux.
Delete any remaining folders only if you no longer need them.
Some Linux distributions also store virtual hard disk files with the .vhdx extension. Removing these files can recover several gigabytes of storage.
Always verify that you no longer need the data before deleting these files.
Method 9: Uninstall the Microsoft Store Version of WSL
Newer versions of Windows 11 install WSL as a Microsoft Store application.
Open Settings.
Go to Apps.
Open Installed apps.
Search for Windows Subsystem for Linux.
Select it.
Choose Uninstall.
Confirm the removal.
Restart your computer once the uninstall finishes.
This removes the Store-managed version of WSL from Windows.
Method 10: Verify That WSL Has Been Completely Removed
After uninstalling everything, it’s a good idea to confirm that WSL is no longer installed.
Open Command Prompt.
Run:
wsl --status
If WSL has been removed, Windows may report that the subsystem is not installed.
Next, run:
wsl --list
No Linux distributions should appear.
You can also check Windows Features to confirm that both Windows Subsystem for Linux and Virtual Machine Platform are disabled.
If all these checks are successful, WSL has been completely removed from your Windows 11 PC.
Can You Reinstall WSL Later?
Yes. Removing WSL is not permanent. If you need Linux again in the future, reinstalling it takes only a few minutes.
Open Command Prompt or PowerShell as Administrator and run:
wsl --install
Restart the computer if prompted.
Once Windows restarts, you can install your preferred Linux distribution from the Microsoft Store or using WSL commands.
This flexibility makes uninstalling WSL a safe decision since it can always be restored later.
Why You Might Want to Uninstall WSL
Although WSL is an excellent feature, not every Windows user needs it. If you rarely use Linux or installed WSL only for testing, removing it can make your system cleaner and recover valuable storage space.
Many users uninstall WSL because they have finished a software development project, switched to a dedicated Linux computer, or prefer using virtual machines instead. Others remove it to troubleshoot Docker issues or reduce unnecessary Windows components.
If you never use Linux commands or development tools, uninstalling WSL won’t affect normal Windows usage. Your documents, installed Windows applications, and personal files remain safe.
Conclusion
Windows Subsystem for Linux is one of the most powerful features available in Windows 11, offering an efficient way to run Linux alongside Windows without a dual-boot setup or traditional virtual machine. However, if you no longer need Linux distributions, uninstalling WSL is a simple process that can help free storage space and reduce unnecessary system components. Depending on your requirements, you can remove a single Linux distribution, unregister every installed distribution, disable Windows features, remove the Microsoft Store version, and delete leftover files for a complete cleanup. The best part is that uninstalling WSL does not affect your Windows installation, and you can reinstall it at any time using a single command if your needs change in the future.
Frequently Asked Questions
Is it safe to uninstall WSL in Windows 11?
Yes. Uninstalling WSL only removes the Linux environment. It does not delete your Windows files, installed Windows applications, or personal documents.
Will uninstalling WSL delete Ubuntu or other Linux distributions?
Yes. If you unregister or uninstall a Linux distribution, all files stored inside that distribution are permanently deleted unless you back them up beforehand.
How do I reinstall WSL after uninstalling it?
Open Command Prompt or PowerShell as Administrator and run the wsl --install command. After restarting your computer, you can install a Linux distribution again.
Do I need to restart Windows after uninstalling WSL?
Yes. Restarting is recommended after disabling Windows Subsystem for Linux or Virtual Machine Platform so that Windows can complete the removal process.


