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'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 syntax of).
wsl --list --verbose
as an edit to your question.wsl --list --verbose
is 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.wsl --unregister
until 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?wsl --import
at 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-AppxPackage
isn't going to work for you sinceGet-AppxPackage
indicates that it's not there.wslconfig /unregister Ubuntu-20.04
in an elevated PowerShell prompt.