I can't uninstall WSL from windows 11

Anonymous
2024-03-01T00:48:09+00:00

I followed several tutorials, I already deleted Ubuntu and Windows subsystem for Linux from the add and remove programs section. But the problem comes when trying to deactivate it from Windows Features, I uncheck it and when I click OK it stays loading (I waited two days and it kept loading) More precisely, it stays at “looking for necessary files.”

Windows for home | Windows 11 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2024-06-16T18:28:33+00:00

    The Linux Icon is there because Windows Subsystem for Linux is still active.

    First you make sure everything is deleted:

    Run those cmds:

    1. wsl --unregister Ubuntu
    2. wsl --uninstall

    When the Linux Path is empty deactivate WSL. To do that you've to go to: "Turn Windows features on and off" and deactivate WSL (Windows Subsystem for Linux"

    Now everything is gone.

    ~Luschtige

    179 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2024-03-01T10:23:05+00:00

    Hi walter david mendoza weber

    Welcome to the Microsoft Community, glad to help you. Realized that you can't uninstall WSL from Windows 11.It is recommended that you try the following:

    1.Use the PowerShell command:

    Open PowerShell (as administrator) and run the following command to disable WSL: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    2.Clean up the residual files related to WSL:

    Check the C:\Users<YourUsername>\AppData\Local\Packages directory for any WSL-related folders, and delete them if there are any.

    Check if there are any folders related to WSL or Ubuntu in the C:\Program Files\ directory, if so, delete them.

    3.Use the command line tool DISM:

    Open a command prompt (as administrator) and run the following command: dism /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

    After running, restart your computer.

    4.Check the integrity of the system files:

    Sometimes corrupted system files may prevent uninstalling the feature. Open a command prompt (as administrator) and run the following command to check and repair the system files: sfc /scannow Then try to uninstall WSL again.

    5.Uninstall in Safe Mode:

    Sometimes, starting Windows in Safe Mode can solve some problems. Restart your computer, then hold down the "Shift" key during startup and click "Restart" to access advanced startup options. Select Troubleshooting > Advanced Options > Startup Settings > Reboot and then on the Startup Settings screen and select "Enable Safe Mode". In Safe Mode, try uninstalling WSL again.

    I look forward to hearing from you and sharing more information.

    Zoro-MSFT | Microsoft Community Support Specialist

    30 people found this answer helpful.
    0 comments No comments

23 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-05-05T18:38:50+00:00

    Here is what worked for me :

    1. I downloaded Revo Uninstaller (the free and portable version) from

    https://www.revouninstaller.com/fr/start-freeware-download-portable/

    It'll be used it to completely remove WSL.

    1. Unzip the file and Launch the version compatible with your system
    2. Then go to the second tab "Windows Apps" and look for "Windows Subsystem for Linux". Double click on it to completely uninstall it (make sure you checked the "create restore point").
    3. When the it's done, a second step will appear with the registry entries related to WSL. Check them all and delete.
    4. Now disable the WSL and Virtual Machine Plateform.
    5. Restart your computer
    6. Re-enable WSL and Virtual Machine Plateform and Restart your computer again and it's OK.

    Hope this will help

    8 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-03-02T07:50:44+00:00

    Hi walter david mendoza weber

    Welcome to the Microsoft Community, glad to help you.

    We have done some troubleshooting on our side and suspect that the problem may be caused by a corrupted image file. We suggest you to repair the image first, after repairing the system image, then try to uninstall WSL may be smoother.

    1. Open the command prompt as administrator

    Type "cmd" in the search box of the start menu.

    Right-click on the "Command Prompt" that appears and select "Run as administrator".

    1. Check the health of your system image

    In the command prompt window, enter the following commands to check the health status of the system image and repair it:

    DISM /Online /Cleanup-Image /CheckHealth

    1. To perform a deeper scan to find any corruption, enter the following command:

    DISM /Online /Cleanup-Image /ScanHealth

    1. Repair the system image

    If the scan reveals a problem, or you want to try to repair any potential corruption, use the following command:

    DISM /Online /Cleanup-Image /RestoreHealth

    This command will attempt to automatically repair the problems found. Depending on the complexity of the problem, this may take some time.

    Make sure your computer is connected to the Internet while doing this, because DISM may download clean versions of files from the Windows Update server if they need to be replaced if they are corrupted.

    The operation may seem to be stuck in motion, especially during the repair process. Please be patient and wait for the command to complete.

    I look forward to hearing from you and sharing more information.

    Zoro-MSFT | Microsoft Community Support Specialist

    6 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-03-01T14:30:54+00:00

    When I put the PowerShell commands I get this, I also tried to do all the other steps (except 5) and they didn't worki still can see the linux sub system

    6 people found this answer helpful.
    0 comments No comments