Deleting WSL after installing Ubuntu from Windows store
The above answer is now deprecated (February '19). Use this instead:
WSLconfig /u Ubuntu
You can and should also uninstall the App via Windows 10 settings -> Apps. Source: https://github.com/Microsoft/WSL/issues/2703
This answer does not apply to Windows 10 version 1709+. If you are running 1709, 1803, or 1809 then you want this. If you are running Windows 10 version 1903+ you want this answer.
I'd like to remove WSL, since I don't really need two Linux shells on my machine. Is it possible to do this? If so, how would I go about doing it?
You simply run the following command in an elevated PowerShell prompt.
lxrun /uninstall /full
If you upgrade to Windows 10 Fall Creators Update from an earlier Windows 10 release upon which you installed WSL, your existing distro will remain intact. However, we STRONGLY encourage you to install a new Store-delivered distro ASAP and migrate any necessary files, data, etc. from your legacy distro to your new distro. To remove the legacy distro from your machine, run the following from a Command Line or PowerShell instance
You can also remove the legacy instance manually by running the following command in an elevated PowerShell prompt.
rm -Recurse $env:localappdata/lxss/
If you wish, you can manually delete your legacy instance. This may be required if you encounter issues uninstalling the legacy distro using lxrun.exe, or are running Windows 10 Spring 2018 Update (or later) which do not ship with lxrun.exe.
Uninstalling/Removing the legacy distro