How to Uninstall Ubuntu 20.04 from WSL Windows 10?

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!

16 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like