How to uninstall WSL2 completely on Windows 11
When WSL2 is uninstalled, the original data can easily be restored if WSL2 is installed again. This steps will uninstall WSL2 completely.
Open command prompt, shutdown WSL, and unregister ubuntu.
PS C:\tmp> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
PS C:\tmp> wsl --shutdown
PS C:\tmp> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 2
PS C:\tmp> wsl --unregister ubuntu
Unregistering.
The operation completed successfully.
From the Settings, Apps > Installed apps, uninstall Ubuntu.

Uncheck Virtual Machine Platform from Windows Features.

From the Settings, System > System components > Windows Subsystem for Linux.

Click “Reset”, so the system components’s data will be deleted.
