I have Windows 10 (build 19042.1110) installed on my PC, and I wanted to install Ubuntu 20.04 using WSL (Windows Subsystem for Linux). So I enabled the WSL. However, I've not used the Microsoft Store to download Ubuntu: I downloaded the distribution directly from here (the .appx file)
Then, I followed these instructions and everything went fine. I created an account with password on Ubuntu, and did the updates/upgrades with apt get update and apt get upgrade.
Then I wanted to uninstall the distribution, but now I can't find it in the app&features panel nor in the start menu. If I search for "ubuntu" or "linux" on the start menu, I find nothing. I think this is due to the fact that I've not used the Microsoft Store.
How can I uninstall the distribution? I'd like to go back to how things were before installing Ubuntu. I've thought of using a system restore point, but I think this is unnecessary.
I'm pretty much a newbie in this area, so thank you for your help.
UPDATE:
I've run the command wsl --list --verbose to check and I got this:
NAME STATE VERSION
* Ubuntu-20.04 Stopped 1
While the command Get-AppxPackage | Where-Object { $_ -like "*Ubuntu*" } didn't output anything.
Also, I found this, don't know if that's my case. However, the same page in my native language suggests using lxrun /uninstall /full for builds before the 1709 (16299) build, while for later builds it suggests using the Remove-AppxPackage cmdlet (which I don't know the sintax of).
(Sorry for the late update, thank you for your patience)
UPDATE 2:
I've used wslconfig /unregister Ubuntu-20.04 and everything went fine. I also reinstalled Ubuntu from Microsoft Store and uninstalled it from Apps & Features, and everything went fine. So thank you guys!
wsl --list --verboseas an edit to your question. – Ramhound Jul 21 '21 at 14:29wsl --list --verboseis an empty list then you can simply delete the folder, since I am going to guess the reason you want to uninstall it, is because you were unable to figure out how to start it. – Ramhound Jul 21 '21 at 14:35wsl --unregisteruntil we figure out if the appx is still installed. It probably can't hurt, but if the real goal is to "go back to how things were before installing Ubuntu", then it won't do that, since the Application itself would still be installed. Does aGet-AppxPackage | Where-Object { $_ -like "*Ubuntu*" }return any results? – NotTheDr01ds Jul 21 '21 at 15:22wsl --unregister Ubuntucommand – Ramhound Jul 21 '21 at 16:44apt get updateandapt get upgrade. But that would mean that they originally had "Ubuntu" in the Start Menu (and Apps & Features), but it's gone now. Why? Perhaps the appx got uninstalled without properly cleaning up the instance, in which case you are right,--unregister, but otherwise it may need aRemove-AppxPackage. – NotTheDr01ds Jul 21 '21 at 17:45Get-AppxPackage | Where-Object { $_ -like "*Ubuntu*" }. – NotTheDr01ds Jul 21 '21 at 20:23wsl --importat any point? Anyway, since the App isn't there, do as @Ramhound suggested andwsl --unregister. If you want to completely uninstall WSL, see this answer. TheRemove-AppxPackageisn't going to work for you sinceGet-AppxPackageindicates that it's not there. – NotTheDr01ds Jul 23 '21 at 15:06wslconfig /unregister Ubuntu-20.04in an elevated PowerShell prompt. – Ramhound Jul 23 '21 at 15:11wsl --import. Thanks for the help guys. – SuperFluo Jul 23 '21 at 17:10