Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Uninstall WSL from Windows Without Losing Your Files

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Uninstalling Windows Subsystem for Linux (WSL) can mean removing one Linux distribution, removing the WSL components, or both. Before you start, decide whether you need to keep any files stored inside Linux: unregistering a distribution permanently deletes its Linux filesystem. Back up anything important first, and use an administrator account if Windows asks for elevated permission.

What You'll Need

  • A Windows 10 or Windows 11 PC with WSL installed.
  • Administrator access for disabling Windows features or removing system components.
  • A backup location outside the distribution if you want to keep Linux files.
  • Access to PowerShell or Windows Terminal. Use an elevated window for system-level removal.

Step-by-Step

  1. Check what is installed. Open PowerShell or Windows Terminal and run wsl --list --verbose. This shows installed distributions and whether they use WSL 1 or WSL 2. If the command is not recognized, WSL may be installed as a Windows feature without the newer command-line package, or it may already be absent.
  2. Back up files you want to keep. Start the distribution you want to preserve, then copy files from its Linux home directory to a Windows folder, external drive, or other backup location. You can open the Linux filesystem in File Explorer by entering \\wsl$\ in the address bar and choosing the distribution. Avoid editing Linux system files from Windows. Alternatively, export a distribution from PowerShell with wsl --export <DistributionName> <BackupPath>, replacing the placeholders with the exact name shown in the list and a destination such as D:\Backups\Ubuntu.tar. Make sure the destination has enough free space and verify that the backup file exists before continuing.
  3. Shut down WSL. In PowerShell, run wsl --shutdown. This stops running distributions and the WSL 2 virtual machine, allowing Windows to remove or change components cleanly.
  4. Uninstall the Linux distribution or distributions. To remove just one, open Settings > Apps > Installed apps (called Apps & features on some Windows versions), select the distribution, choose Uninstall, and confirm. Repeat for each distribution you intend to remove. You can also run wsl --unregister <DistributionName> in PowerShell. This deletes that distribution and all files in its Linux filesystem; it is not a reversible step. Do not use it unless you have saved what you need.
  5. Remove the WSL application package, if present. In Settings > Apps > Installed apps, look for Windows Subsystem for Linux and choose Uninstall. This package is separate from the Linux distributions. If you do not see it, skip this step; availability and labels vary between Windows versions and installation methods.
  6. Disable the Windows features if you want WSL components removed too. Search Windows for Turn Windows features on or off, open it, and clear Windows Subsystem for Linux. If you also want to remove the virtualization component used by WSL 2, clear Virtual Machine Platform as well. Click OK and restart when prompted. Virtual Machine Platform may be needed by other software, including some virtual machines, so leave it enabled if you still use it. On some systems, the WSL feature is managed through Settings or PowerShell instead of this dialog.
  7. Confirm the result. After restarting, open PowerShell and run wsl --list --verbose. If distributions remain, remove each one you no longer need. If the command reports that WSL is not installed or no distributions are present, the relevant parts have been removed. You do not need to disable virtualization in your computer’s firmware just to uninstall WSL.

Common Mistakes

  • Removing a distribution before backing it up. Unregistering or uninstalling a distribution deletes its Linux files, including project files and configuration stored inside it. A Windows restore point is not a substitute for a distribution export or file backup.
  • Uninstalling only the distribution. Removing Ubuntu or another Linux distribution does not necessarily remove the WSL application or Windows features. Check each layer if your goal is a complete removal.
  • Disabling Virtual Machine Platform unnecessarily. This can affect other virtualization tools. Remove it only if you no longer need software that depends on it.
  • Assuming every WSL install looks the same. Windows versions and installation methods differ. The WSL app may not appear in Installed apps, and feature names or available commands may vary.

Tips

  • To remove WSL but keep a portable copy of a distribution, export it before uninstalling. An export is a backup file, not a live installation; you can later restore it with wsl --import on a compatible system.
  • If you have several distributions, copy the exact names from wsl --list --verbose. The name may not match the display name you expect.
  • If you only want to reclaim space or remove one Linux environment, uninstall that distribution and leave WSL enabled. This avoids disrupting other distributions or virtualization software.
  • Restart Windows after changing optional features, even if the dialog does not make the restart seem urgent. A restart helps complete removal of loaded components.

Troubleshooting

“The WSL command is not recognized.” Try the Windows features dialog to check whether Windows Subsystem for Linux is enabled. If you only need to remove a distribution, look for it under Installed apps. If it is not listed and the command is unavailable, WSL may already be removed or installed through a different Windows configuration.

A distribution will not uninstall or says it is running. Close Linux applications and terminals, then run wsl --shutdown in PowerShell. Try uninstalling again. If the Settings entry remains, restart Windows and check again.

Windows asks for administrator permission or will not let you change features. Sign in with an administrator account, or open the Start menu, search for PowerShell, right-click it, and select Run as administrator. Follow any organization-managed device policies; do not try to bypass them.

The feature dialog does not show WSL. Check Installed apps for the WSL package and the distribution. Feature availability and names depend on the Windows release. If a managed or older installation still appears active, use Windows Update and your organization’s support documentation before making further changes.

You deleted a distribution and need its files back. If you made an export or separate backup, restore from that copy. Unregistering a distribution removes its data, and Windows does not provide a reliable undo for that action. Stop writing to the relevant storage and consult a data-recovery specialist if the files are critical, but recovery is not guaranteed.

Frequently Asked Questions

Does uninstalling WSL delete my Linux files?
Removing or unregistering a distribution deletes its Linux filesystem. Back up or export files before removal. Disabling a Windows feature alone is different, but do not rely on it as a backup strategy.

Can I uninstall Ubuntu but keep WSL?
Yes. Uninstall only Ubuntu from Installed apps, or unregister that distribution after backing up its data. Leave the WSL application and Windows features enabled.

Do I need to remove both WSL and Virtual Machine Platform?
No. Remove Virtual Machine Platform only if you want to remove that optional Windows feature and do not need it for WSL 2 or other virtualization software.

Will uninstalling WSL remove Docker Desktop?
Not necessarily. Docker Desktop is a separate application, but its configuration may use WSL 2. Check Docker’s own uninstall instructions and back up anything you need before changing WSL components.

Can I reinstall WSL later?
Usually, yes. You can reinstall WSL and distributions using supported Windows setup methods, provided your Windows version supports them. An exported distribution can be imported later if you kept the backup.

Should I disable CPU virtualization in BIOS or UEFI?
No. WSL removal does not require changing firmware virtualization settings. Other software may depend on virtualization, so leave it configured unless you have a separate reason to change it.