The WSL (Windows Subsystem for Linux) program on your PC lets you run Ubuntu or other Linux distributions on your Windows OS. But if you don’t use WSL anymore and it’s still consuming your computer’s resources, it’s best to uninstall it.
As the uninstallation of WSL in Windows 11 differs from the usual process, you’ll need this guide to help uninstall WSL entirely from your PC. So, read the step-by-step guide to uninstall WSL in Windows 11 without removing the necessary files from your PC.
Table of Contents
- 5 Ways to Uninstall WSL from Windows 11
- Why Should You Uninstall WSL?
- Frequently Asked Questions
5 Ways to Uninstall WSL from Windows 11
You can uninstall WSL from Programs and Features in the Control Panel. You can also use the Registry Editor, PowerShell Script, or third-party uninstaller program to completely remove WSL from your PC.
There are several ways to uninstall Windows Subsystem for Linux on Windows 11. You can refer to any one of the methods to remove WSL from your machine.
1. Uninstall WSL via Programs and Features
In this method, you have to first remove the Linux Distro and Windows Subsystems for Linux components. Then, uninstall WSL from the Programs and Features menu in the Control Panel. Here’s how to do it:
- Open the Start menu, search for Settings and launch the application.
- From the Settings home screen, use the menu on the left to navigate to Apps > Apps and Features.
- Search for the Linux distribution that you have installed and click the three dots on the right side of the app name. Then, click Uninstall from the dropdown menu.
- A prompt will appear to confirm the uninstallation of the Linux distribution. Click Uninstall again to confirm the action and wait for the process to complete.
Finally, you have uninstalled the Linux distribution from your Windows 11. However, there are other subcomponents, like kernel and interface components, that you need to uninstall.
- Head back to the Settings App.
- Navigate to Apps > Apps and Features.
- Search for Windows Subsystem for Linux WSLg Preview.
- Click the three dots on the right side of the App.
- Then, click Uninstall from the dropdown menu and wait for the process to complete.
- Follow the same steps to uninstall Windows Subsystem for Linux Update.
Once done, the last step is removing the extra WSL functionality from the machine. For this step, do the following:
- Open the Windows Settings App.
- Navigate to Apps > Apps Settings > Optional Features.
- Search for More Windows Features and click the settings under Related Settings.
- From the Windows Features list, uncheck Virtual Machine Platform and Windows Subsystem for Linux, and click Ok.
- Lastly, restart your PC to implement the changes.
2. Remove WSL From Windows 11 Using the Registry Editor
The Windows Registry is a database that stores all the configuration settings and information on the hardware, users, preferences, and software installed on the PC. You can modify this information using the Registry Editor and uninstall any application from your computer.
Here’s how you can uninstall WSL From Windows 11 Using the Registry Editor. However, making changes in the registry can be risky, as one wrong move could lead to a system crash. So, you must proceed with caution.
- Press Windows + R to open the Run Command dialogue box. Type regedit and press Enter key to open the registry.
- In the navigation panel above, enter the following path and hit Enter.
- Now, you’ll have to find the folder that contains the registry details of the Windows Subsystem for Linux. To identify the folder, look for the DisplayName in the table displayed on the right side of the Registry Editor.
- Once you locate the right folder, double-click the file named as UninstallString.
- Copy the string under the Value data: box from the pop-up window.
- Now, open the Run dialogue box again using Windows + R, paste the UninstallString value, and hit Enter.
- You’ll get a confirmation pop-up from Windows Installer. Click Yes, and WSL will be removed from your computer.
3. Remove WSL Using PowerShell Script
The third method to uninstall WSL is using Powershell Script. Here is how to do it:
- Press the Windows key to open the Start menu. Type PowerShell to see the search result.
- Right-click the Windows PowerShell application and choose Run as Administrator.
- Wait for it to open the command prompt. After that, type the command given below to find the correct name of the application: Get-AppxPackage –AllUsers | Select Name, PackageFullName.
- Next, execute the command given below to uninstall the particular Linux Distro: wslconfig /u package_name
- Alternatively, you can run this command to uninstall WSL: wsl –unregister package_name
- After the process is complete, WSL and the associated Linux Distro will be removed from your computer.
4. Use a Third-Party Uninstaller
Use a third-party uninstaller program if you suspect your WSL installation is corrupt or have trouble uninstalling it. These programs can remove residual files and registry entries that are left behind after a standard uninstall. This is helpful if you want to uninstall WSL and all its components without going after them individually.
You can find many different third-party uninstallers. But some of the popular ones are Revo Uninstaller, IOBit Uninstaller, and Wise Program Uninstaller.
To use a third-party uninstaller, simply download and install the program on your computer. Once the uninstaller is installed, launch it and select WLS and its components from the list of installed programs. The uninstaller will then take care of the rest, uninstalling the program and removing all its files from your computer.
5. Reinstall WSL to Uninstall
In some situations, you might need to reinstall WSL to uninstall it properly. That is, if the program is corrupt and isn’t uninstalling properly, you should reinstall WSL to get back the necessary files to uninstall WSL.
Another reason is that if you accidentally delete the program files required during the uninstallation process, you need to reinstall WSL. Later, you can follow the uninstalling methods to completely uninstall the program from your PC.
So, in such situations, it is best to reinstall WSL again to gain access to fresh files that are not corrupted. Once it is installed, you can use any of the five methods discussed in the article to uninstall WSL.
Why Should You Uninstall WSL?
You should consider uninstalling WSL because it can cause performance issues and uses too much memory of your PC resources. This program can also lead to certain security risks that may harm your PC if kept unchecked.
Despite the issues, Windows Subsystem for Linux (WSL) is useful as it provides a compatibility layer for running Linux binary executables (in ELF format) natively on Windows. But the reasons below will help you decide whether you should uninstall WSL from your PC.
- Performance Issue: WSL can cause performance issues on some system configurations. That’s why it’s generally recommended that developers and power users disable it to improve your PC performance.
- Storage Consumption: Windows Subsystem for Linux (WSL) consumes significant disk space and resources on your PC. So, uninstalling WSL can free up a significant amount of space if you’re running low on storage.
- Security Risk: Lastly, WSL can also be a security risk, as it allows malicious code to run directly on your Windows system. If you’re not using WSL or are concerned about any of these issues, we recommend you uninstall it.
Frequently Asked Questions
What does Linux Distro mean?
Linux Distro is a version of the Linux operating system that includes the Linux kernel and other tools and applications. There are many different Linux distros available, each with its own unique features and characteristics. They can be used for a variety of purposes.
How can I know if WSL is installed on my PC?
You can check WSL on your system using two methods.
One, search Turn Windows features on or off in the search bar, and check whether the Windows Subsystem for Linux option is checked. If it’s checked, WSL is installed.
Second, run the command Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux in a PowerShell window. If the output includes “State : Enabled,” WSL is installed.
Is WSL installed on Windows 11 by default?
WSL (Windows Subsystem for Linux) is not installed on Windows 11 or any other version of Windows by default. However, it is available as an optional feature that you can install from the Windows Features dialog box.