How to uninstall the WSL installation of Ubuntu 20.04 from Windows 10?

I installed Ubuntu 20.04 from Microsoft store. After hours of tutorials, I cannot get any further than a command prompt. No desktop, GUI, or whatever it is called.

My problem now is how to rid my pc of all Ubuntu/Linux files or whatever you may call them. Trouble is I cannot see a partition in disc management or anything about Ubuntu. Once again Lady Luck has vomited on my eiderdown.

Please help.


Solution 1:

Uninstall a WSL installation of Ubuntu like a normal Windows 10 application. To uninstall Ubuntu, right-click the Ubuntu shortcut in your Start menu and click Uninstall.

To reinstall Ubuntu, download it from the Microsoft Store once again.


To (optionally) also uninstall Windows Subsystem for Linux:

Open the Control Panel and go to Programs -> Turn Windows Features On or Off. Uncheck the Windows Subsystem for Linux option there and click OK. Windows will uninstall Windows Subsystem for Linux, bash.exe, and lxrun.exe commands.


All that was good advice so far. The bad way to do it if nothing else works is to install an unlocker program in Windows 10, and unlock the file so that you can delete it.