Wed, 30 Apr 2025 13:08:34 +0000
A lot of people want Linux but do not want to go either remove Windows or take up the overwhelming task of dual booting. For those people, WSL (Windows Subsystem for Linux) came as a blessing. WSL lets you run Linux on your Windows device without the overhead of a Virtual Machine (VM). But in some cases where you want to fix a problem or simply do not want WSL anymore, you may have to uninstall WSL from your Windows system.
Here is step-by-step guide to remove WSL from your Windows system, remove any Linux distribution, delete all related files, and clear up some disk space. Ready? Get. Set. Learn!
What is WSL
You probably knew by now that we will always start with the basics i.e., what WSL does. Think of WSL as a compatibility layer for running Linux binaries on Microsoft Windows systems. It comes in two versions:
- WSL 1: Uses a translation layer between Linux and Windows.
- WSL 2: Uses a real Linux kernel in a lightweight VM.
All around the world, WSL is a favourite among developers, system administrators, and students for running Linux tools like bash, ssh, grep, awk, and even Docker. But if you have moved to a proper Linux system or just want to do a clean reinstall, here are the instructions to remove WSL completely without any errors.
Step 1: How to Uninstall Linux Distributions
The first step to uninstall WSL completely is to remove all installed Linux distributions.
Check Installed Distros
To check for the installed Linux distributions, open PowerShell or Command Prompt and run the command:
wsl --list --all
After executing this command, you will see a list of installed distros, such as:
- Ubuntu
- Debian
- Kali
- Alpine
How to Uninstall a Linux Distro
To uninstall a distro like Ubuntu, follow these instructions:
- Press Windows key + I to open Settings window.
- Go to Apps, then click Installed Apps (or Apps & Features).
- Search for your distro and click Uninstall.
Repeat for all distros you no longer need. If you plan to uninstall WSL completely, we recommend removing all distros.
if you prefer PowerShell, run these commands
wsl --unregister <DistroName>
For example, if you want to remove Ubuntu, execute the command:
wsl --unregister Ubuntu
This removes the Linux distro and all its associated files.
Step 2: Uninstall WSL Components
Once we have removed the unwanted distros, let us uninstall the WSL platform itself.
- Open Control Panel and navigate to Programs and then click Turn Windows features on or off.
- Uncheck these boxes:
- Windows Subsystem for Linux
- Virtual Machine Platform (used by WSL 2)
- Windows Hypervisor Platform (optional)
- Click OK and restart your system.
Step 3: Remove WSL Files and Cache
Even after uninstalling WSL and Linux distributions, some data might remain. Here are the instructions to delete WSLโs cached files and reclaim disk space.
To delete the WSL Folder, open File Explorer and go to:
%USERPROFILE%\AppData\Local\Packages
Look for folders like:
- CanonicalGroupLimited…Ubuntu
- Debian…
- KaliLinux…
Delete any folders related to WSL distros you removed.
Step 4: Remove WSL CLI Tool (Optional)
If you installed WSL using the Microsoft Store (i.e., “wsl.exe” package), you can also uninstall it directly from the Installed Apps section:
- Go to Settings, and then to Apps and then open Installed Apps.
- Search for Windows Subsystem for Linux.
- Click Uninstall.
Step 5: Clean Up with Disk Cleanup Tool
Finally, use the built-in Disk Cleanup utility to clear any temporary files.
- Press “Windows key + S and search for Disk Cleanup.
- Choose your system drive (usually drive C:).
- Select options like:
- Temporary files
- System created Windows error reporting
- Delivery optimization files
- Click OK to clean up.
Bonus Section: How to Reinstall WSL (Optional)
If you are removing WSL due to issues or conflicts, you can always do a fresh reinstall.
Here is how you can install latest version of WSL via PowerShell
wsl --install
This installs WSL 2 by default, along with Ubuntu.
Wrapping Up
Uninstalling WSL may sound tricky, but by following these steps, you can completely remove Linux distributions, WSL components, and unwanted files from your system. Whether you are making space for something new or just doing some digital spring cleaning, this guide ensures that WSL is uninstalled safely and cleanly.
If you ever want to come back to the Linux world, WSL can be reinstalled with a single command, which we have covered as a precaution. Let us know if you face any errors. Happy learning!
The post Uninstall WSL: Step-by-Step Simple Guide appeared first on Unixmen.
Recommended Comments