Windows Subsystem for Linux (WSL) is one of the most powerful features available in Windows 11 for developers, system administrators, and advanced users who need Linux tools directly inside the Windows environment. It allows you to run Linux distributions such as Ubuntu, Debian, Kali Linux, and others without needing a separate virtual machine. While WSL is extremely useful, not every user needs it permanently. Some people install WSL for testing, development, or experimentation and later decide to remove it completely to free up storage, improve system organization, or eliminate unnecessary background components.
If you are looking to completely uninstall WSL on Windows 11, simply uninstalling the Linux distribution may not be enough. WSL includes multiple components such as Linux distributions, virtual machine files, Windows features, and supporting system files. To fully remove it from your computer, you need a complete step-by-step process.
This detailed guide explains how to entirely uninstall WSL from Windows 11, including deleting all Linux distributions, disabling virtualization components, removing leftover files, and ensuring your system is clean. Whether you want to reclaim storage or simply reset your system configuration, this guide covers everything you need.
Why You May Want To Uninstall WSL
There are several reasons why users choose to remove WSL from Windows 11. For some, it may no longer be necessary after completing a development project. Others may experience compatibility issues, consume unnecessary disk space, or simply prefer using dedicated virtual machines instead.
Common reasons include:
- Freeing up disk space used by Linux distributions
- Removing development environments no longer needed
- Troubleshooting WSL-related issues
- Cleaning up Windows features
- Switching to other virtualization software
- Improving system simplicity
Because WSL can occupy multiple gigabytes depending on installed distributions, removing it completely can noticeably improve storage availability.
Step 1: Uninstall Installed Linux Distributions
Before removing WSL itself, you should uninstall all Linux distributions currently installed on your system. These distributions include Ubuntu, Debian, Kali Linux, Fedora, or others you may have downloaded from the Microsoft Store.
To uninstall a Linux distribution:
- Press Windows + I to open Settings
- Go to Apps
- Select Installed Apps
- Scroll through the list and locate your Linux distribution
- Click the three-dot menu next to it
- Select Uninstall
- Confirm the removal
Repeat this process for every installed Linux distribution.
You can also remove distributions using PowerShell:
- Open PowerShell as Administrator
- Run:
wsl --list --verbose
This command displays all installed distributions.
To unregister a specific distribution:
wsl --unregister Ubuntu
Replace “Ubuntu” with your distribution’s actual name.
This permanently deletes the Linux environment and all associated files.
Step 2: Shut Down WSL
After removing distributions, shut down all WSL processes to ensure no background services remain active.
Run:
wsl --shutdown
This command stops all running Linux instances and WSL services.
Step 3: Disable Windows Subsystem for Linux Feature
Now you need to disable the core WSL feature in Windows.
Using Windows Features
- Press Windows + S
- Search for Turn Windows features on or off
- Open it
- Locate Windows Subsystem for Linux
- Uncheck the box
- Click OK
- Restart your computer
Using PowerShell
Alternatively, use:
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
Restart your PC afterward.
Step 4: Disable Virtual Machine Platform
WSL 2 depends on Virtual Machine Platform, so removing WSL fully also requires disabling this feature.
Through Windows Features
- Open Turn Windows features on or off
- Find Virtual Machine Platform
- Uncheck it
- Click OK
- Restart your system
PowerShell Method
dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
Then reboot your computer.
Step 5: Remove Hyper-V Components (Optional)
If you installed Hyper-V specifically for WSL or virtualization and no longer need it, you may also disable it.
- Open Windows Features
- Uncheck:
- Hyper-V
- Windows Hypervisor Platform
- Windows Sandbox (if unnecessary)
Or use PowerShell:
dism.exe /online /disable-feature /featurename:Microsoft-Hyper-V-All /norestart
Restart after making changes.
Step 6: Delete WSL Package Data and Leftover Files
Even after uninstalling, some WSL files may remain on your drive.
Remove AppData Files
Navigate to:
C:\Users\YourUsername\AppData\Local\Packages
Look for folders related to Linux distributions such as:
- CanonicalGroupLimited
- Debian
- KaliLinux
- SUSE
Delete these folders.
Remove WSL System Files
Check:
C:\Users\YourUsername\.wslconfig
Delete this file if present.
Also inspect:
C:\Users\YourUsername\AppData\Local\lxss
If available, delete it.
Remove Virtual Disk Files
WSL 2 often stores Linux systems in VHDX files.
Search for:
ext4.vhdx
Delete any related files to reclaim storage.
Step 7: Remove Microsoft Store Downloads
Some Linux distributions installed through Microsoft Store may leave package remnants.
To clear cache:
- Press Windows + R
- Type:
wsreset.exe
- Press Enter
This resets Microsoft Store cache.
Step 8: Verify WSL Is Fully Removed
After restarting, open PowerShell and type:
wsl --list
If WSL is completely removed, you should receive an error or empty result indicating no distributions are installed.
You can also check:
wsl --status
If disabled, WSL should no longer function.
Step 9: Clean Temporary Files
To optimize your system after uninstalling WSL:
- Open Settings
- Go to System > Storage
- Select Temporary Files
- Remove unnecessary files
You may also use:
Disk Cleanup
This helps recover additional storage.
Troubleshooting Common WSL Removal Issues
Sometimes WSL may not uninstall properly due to corrupted installations or permission issues.
WSL Command Still Exists
Even after removal, the command-line tool may remain because it is part of Windows system components. This is normal as long as the feature is disabled.
Linux Distribution Won’t Uninstall
Try manually unregistering:
wsl --unregister DistributionName
Access Denied Errors
Ensure you:
- Use Administrator privileges
- Close all terminal sessions
- Restart before retrying
Leftover VHDX Files
Search manually across all drives for:
*.vhdx
Delete relevant WSL virtual disks.
Benefits Of Fully Removing WSL
Completely uninstalling WSL can offer several advantages:
- Recover gigabytes of disk space
- Remove virtualization overhead
- Simplify system configuration
- Improve software compatibility
- Eliminate unused developer tools
- Reduce maintenance complexity
For users who no longer require Linux environments, this cleanup can streamline Windows 11 significantly.
Can You Reinstall WSL Later?
Yes, uninstalling WSL is fully reversible. If you decide to use Linux again, reinstalling is simple.
Run:
wsl --install
This reinstalls WSL and the default Linux distribution.
You can also install specific distributions via Microsoft Store anytime.
Important Precautions Before Uninstalling
Before completely removing WSL:
- Back up important Linux files
- Export distributions if needed:
wsl --export Ubuntu ubuntu-backup.tar
- Save configuration files
- Verify no critical development environments are in use
Once distributions are unregistered, data is permanently deleted unless backed up.
Final Thoughts
WSL is a fantastic tool for running Linux on Windows 11, but not every user needs it forever. If you want to completely uninstall WSL, it is important to remove more than just the Linux distribution itself. Fully deleting WSL requires uninstalling Linux distributions, shutting down services, disabling Windows features, removing virtual machine support, and cleaning leftover files.
By following the complete process outlined above, you can ensure that WSL is entirely removed from your system, freeing storage space and restoring a cleaner Windows environment. Whether you are troubleshooting issues, simplifying your setup, or reclaiming resources, a proper WSL uninstall ensures no unnecessary components remain behind.
If you ever need Linux tools again, WSL can be quickly reinstalled, making this process safe and flexible for future needs.


