How can I completely remove WSL and the leftover Linux entry from File Explorer?

0
2
Asked By QuietMango42 On

I uninstalled Docker and tried removing Windows Subsystem for Linux, but Linux still appears in File Explorer and WSL still shows up in searches. WSL is not listed under installed apps, and running WSL commands reports that no distributions are installed rather than indicating that WSL is unavailable. I have already tried PowerShell, DISM, and third-party uninstall tools. What is the proper way to remove the remaining WSL files and the Linux entry?

3 Answers

Answered By BlueCedar88 On

It can help to check the other Explorer registry locations as well, especially `HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionExplorer` and `HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionExplorer`. Search for `wsl` and `linux`, then restart Explorer after cleaning up any clearly related orphaned entries.

Answered By CopperLynx7 On

First check for any remaining distributions with `wsl --list --verbose`, then run `wsl --shutdown`. If Docker created distributions, unregister `docker-desktop` and `docker-desktop-data`, then remove any leftover Docker WSL folder under your local application data. You may need to reinstall WSL first so the commands are available, then unregister everything and disable the Windows feature afterward.

Answered By SunnyPebble19 On

If the Linux entry remains in File Explorer even after WSL is disabled, it may be an orphaned Explorer namespace registry entry. In Registry Editor, search beneath `HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerDesktopNameSpace` for entries containing `wsl` or `linux`, with subtree searching enabled, and remove the leftover entry. Back up the registry first, since deleting the wrong key can affect Explorer.

MildOrbit53 -

I spent hours trying other methods, and removing the stale registry entry was the only thing that finally made the Linux directory disappear.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.