If you want to remove a Linux distro from your Windows Subsystem for Linux (WSL) installation, you can use the wsl --unregister <distro-name>
command to unregister it.
This blog post shows a quick demo of uninstalling a WSL distro. Keep in mind that unregistering a distro will permanently delete all data, setting and software associated with it. If you want to reinstall you can do so using the Microsoft Store.
Uninstalling a WSL Distro
1. First, we’ll run the following command to check our installed WSL distributions:
# show list of wsl distros wsl -l -v
2. Take the name from this command and uninstall it by running this:
# unregister a wsl distro wsl --unregister <distro_name>
In the example above we have successfully uninstalled the Ubuntu-20.04 distro.
Hope this was useful, check out the WSL tag link below for more tips like this one!