Uninstall Linux Subsystem Windows 11: Full Guide
In this article
Yes, you can fully uninstall the Windows Subsystem for Linux (WSL) on Windows 11, and the process takes less than five minutes. This article explains exactly how to remove WSL, what happens to your Linux files, and how to decide whether a full uninstall is the right move.
What Is WSL and Why Would You Remove It?
Windows Subsystem for Linux (WSL) is a compatibility layer that lets you run a real Linux kernel and userland directly on Windows 11 without a virtual machine. It’s popular with developers, sysadmins, and anyone who needs Linux command-line tools. But you might want to uninstall it if:
- You no longer use Linux tools and want to free up disk space.
- WSL is causing boot or performance issues.
- You’re switching to a different virtualization solution like Hyper‑V or a third‑party VM.
- You want to remove all traces of Linux from your system for privacy or simplicity.
Uninstalling WSL is reversible — you can reinstall it later with a single command — but it permanently deletes the Linux distributions you’ve installed and their files unless you back them up first.
Before You Uninstall: Back Up Your Linux Files
When you uninstall a WSL distribution, all its files — home directories, installed packages, and configuration — are deleted. There is no recycle bin. If you have any data inside WSL that you want to keep, export it to a tar file first.
Open PowerShell or Command Prompt and run:
wsl --export
For example, to back up Ubuntu to your Documents folder:
wsl --export Ubuntu C:ackups놺ckup.tar
Then, after reinstalling WSL later, you can import the backup with wsl --import. If you only care about a few files, copy them to Windows using the \wsl$ path in File Explorer (e.g., \wsl$놺ntu
oot).
How to Uninstall WSL on Windows 11 (Step by Step)
There are two levels of removal: uninstall a single Linux distribution, or remove the entire WSL feature. Most people want to remove everything, so we’ll cover both.
Option 1: Uninstall a Single Distribution
If you only want to remove one Linux distro (e.g., Ubuntu) but keep WSL itself:
- Open Settings (Win + I) → Apps → Installed apps.
- Search for the distribution name (e.g., “Ubuntu”).
- Click the three‑dot menu next to it and select Uninstall.
- Confirm the prompt.
Alternatively, use the command line: wsl --unregister Ubuntu — this removes the distribution and its files immediately.
Option 2: Remove the Entire WSL Feature
To completely uninstall WSL from Windows 11:
- Open Settings → Apps → Optional features (or search “Windows features” in the Start menu).
- Scroll down to Windows Subsystem for Linux and uncheck it.
- Also uncheck Virtual Machine Platform if you want to remove the underlying virtualization components (but note: this may affect other features like Windows Sandbox).
- Click OK and restart your PC when prompted.
Alternatively, run this command in an elevated PowerShell (Admin):
wsl --uninstall
This command removes all WSL components, including the kernel and any installed distributions. After a reboot, WSL is gone.
What Happens to Your Disk Space and System?
Uninstalling WSL frees disk space, but the amount varies. A minimal WSL installation with no distributions uses only a few hundred megabytes. Each Linux distribution typically takes 1–2 GB, plus any files you’ve created inside it. The wsl --uninstall command also removes the virtual hard disk (VHD) files that store your Linux filesystems, so you’ll recover that space immediately.
Removing the WSL feature also disables the Virtual Machine Platform (if you unchecked it), which is a Windows component that enables WSL 2 and other virtualization‑based features. If you later want to use Docker Desktop with WSL 2 backends, you’ll need to re‑enable it.
Your Windows files, programs, and settings are unaffected. Uninstalling WSL does not touch your Windows user profile or installed applications.
Common Problems and How to Avoid Them
Users often run into a few issues when uninstalling WSL:
- “Distribution is still registered” error — If you remove the WSL feature but a distribution remains registered, run
wsl --unregisterfirst, then uninstall the feature. - WSL won’t uninstall because it’s in use — Close all WSL terminals and stop any Linux processes (e.g., Docker Desktop that uses WSL). You can check with
wsl --shutdown. - Files still visible in File Explorer — After uninstalling a distribution, the \wsl$ path may still show a stale entry. Restart Explorer or reboot to clear it.
- Windows Sandbox or Hyper‑V stops working — If you uncheck Virtual Machine Platform, features that depend on it (like Windows Sandbox) may fail. Only uncheck it if you’re sure you don’t need those.
Alternatives to Full Uninstall
If you’re not ready to commit to removing WSL, consider these lighter options:
- Disable WSL temporarily — Use
wsl --shutdownto stop all WSL processes without uninstalling. This frees RAM and CPU, but not disk space. - Uninstall only the distributions you don’t use — Keep WSL for future needs, but remove specific distros to save space.
- Move WSL to another drive — If disk space is the issue, you can move the entire WSL data to a different drive using
wsl --exportandwsl --importto a new location, then delete the old one. - Use a virtual machine instead — If you need full Linux GUI or kernel control, consider VirtualBox or Hyper‑V with a Linux ISO. That’s a separate install, not a replacement for WSL.
Frequently Asked Questions
Does uninstalling WSL delete my files?
Yes, uninstalling a WSL distribution deletes all files inside that distribution’s filesystem. If you uninstall the entire WSL feature, all distributions and their files are removed. You must export or copy files to Windows before uninstalling if you want to keep them.
Can I reinstall WSL after uninstalling?
Absolutely. You can reinstall WSL at any time by running wsl --install in an elevated PowerShell. This will install the latest WSL version and a default distribution (usually Ubuntu). Your previous distributions and files will be gone unless you exported them.
Will uninstalling WSL speed up my PC?
It might, but only if WSL was consuming significant resources. WSL 2 uses a lightweight VM that can use CPU and RAM when Linux processes are running. If you rarely use WSL, uninstalling it frees a small amount of disk space and removes background VM overhead, but the impact on everyday performance is usually negligible.
What’s the difference between uninstalling WSL and disabling it?
Uninstalling removes the feature and all distributions. Disabling (via wsl --shutdown or turning off the Windows feature) stops WSL from running but keeps your distributions and files intact. Disabling is reversible without reinstalling.
Does uninstalling WSL affect Docker Desktop?
Yes, if you use Docker Desktop with the WSL 2 backend, uninstalling WSL will break Docker. Docker Desktop can fall back to Hyper‑V backend, but that requires a different setup. If you rely on Docker, either keep WSL or switch Docker to a non‑WSL backend.