How to Uninstall WSL in Windows 11: A Step-by-Step Guide

//

Michael Collins

How to Uninstall WSL in Windows 11

Uninstalling WSL (Windows Subsystem for Linux) in Windows 11 is pretty straightforward. You just need to follow a series of steps that involve using the Settings app and a few commands in PowerShell. By the end of this guide, you’ll have WSL completely removed from your system. Let’s get started!

How to Uninstall WSL in Windows 11

We’ll walk you through the process of uninstalling WSL step-by-step. Each step includes a bit of background to understand what you’re doing and why. Ready? Here we go!

Step 1: Open the Start Menu

Click on the Start menu in the bottom-left corner of your screen.

The Start menu is your gateway to all the apps on your computer, including Settings, which you’ll need for the next steps.

Step 2: Open Settings

Click on the Settings app in the Start menu.

In the Settings app, you can alter many aspects of Windows, including features like WSL.

Step 3: Go to Apps

In the Settings app, navigate to the "Apps" section.

The Apps section allows you to manage all installed applications and features on your computer.

Step 4: Click on Optional Features

Within Apps, click on "Optional Features."

Optional Features is where you can enable or disable various Windows components such as WSL.

Step 5: Find and Uninstall WSL

Scroll down and find Windows Subsystem for Linux, then click on it and select "Uninstall."

Removing WSL from Optional Features will disable the Linux subsystem on your Windows machine.

Step 6: Open PowerShell as Admin

Right-click on the Start menu and select "Windows Terminal (Admin)."

Using PowerShell with administrative privileges ensures you have the necessary permissions to complete the uninstallation.

Step 7: Uninstall Linux Kernels and Distros

In the PowerShell window, type in wsl --unregister for each installed Linux distribution.

Unregistering the Linux distributions removes the actual data and settings of the Linux systems you had installed.

Step 8: Remove WSL Components

Type wsl --shutdown followed by dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux in the PowerShell window.

This command will fully remove the WSL components from your system.

Once you’ve completed these steps, WSL and all its components will be fully uninstalled from your Windows 11 machine. You can always reinstall it if you need it again in the future.

Tips for Uninstalling WSL in Windows 11

  • Make sure to back up any important data from your Linux distributions before uninstalling.
  • Double-check that you’ve unregistered all WSL distributions to avoid leaving behind any data.
  • If you encounter issues, use the PowerShell command wsl --list to see all installed distributions.
  • Always run PowerShell as an administrator when performing system-level changes.
  • Reboot your system after uninstalling WSL to ensure all changes take effect.

Frequently Asked Questions

Do I lose my data when I uninstall WSL?

Yes, uninstalling WSL and its distributions will delete all related data. Back up any important files before proceeding.

Can I reinstall WSL later?

Absolutely, you can easily reinstall WSL through the Optional Features section in Windows Settings.

What if I only want to remove a specific Linux distribution?

You can unregister a specific distribution by using the command wsl --unregister in PowerShell.

Will uninstalling WSL affect other apps?

No, uninstalling WSL will not affect other Windows applications.

How do I know WSL is completely removed?

Run the command wsl --list in PowerShell. If no distributions are listed, WSL has been removed.

Summary

  1. Open the Start Menu.
  2. Open Settings.
  3. Go to Apps.
  4. Click on Optional Features.
  5. Find and uninstall WSL.
  6. Open PowerShell as Admin.
  7. Uninstall Linux kernels and distros.
  8. Remove WSL components.

Conclusion

Uninstalling WSL in Windows 11 might seem a bit daunting at first, but by following these steps, you’ll find it’s not too difficult. Whether you need to free up some space, or you’re simply done using the Linux subsystem, these instructions will help you to remove it completely and cleanly.

Remember, you can always reinstall WSL if you find you need it again. Backup your data, follow the steps carefully, and your system will be WSL-free in no time. For further reading, you might want to explore more about managing optional Windows features or dive into the world of PowerShell to unlock even more control over your Windows environment.

Ready to get started? Open up that Start menu and let’s get WSL uninstalled!