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 is useful for cleaning up an old installation and starting fresh with a new distro.
To unregister a Linux distro in Windows Subsystem for Linux (WSL), you can follow the steps in this blog post.
Keep in mind that unregistering a distro will permanently delete all data, settings, and software associated with it. If you want to use the distro again, you will need to reinstall it from the Microsoft Store.
Uninstall a WSL Distro
Open a command prompt or terminal and type the following command to show a list of all the WSL distros currently installed on your machine:
# show list of wsl distros wsl -l -v
Identify the distro you want to remove from the list and type the following command, replacing <distro_name> with the name of the distro you want to unregister:
# unregister a wsl distro wsl --unregister <distro_name>
In the example given above, the user has unregistered their Ubuntu-20.04 distro.
If you want to learn more about using the Windows Subsystem for Linux (WSL), you can check out my WSL page. It includes a list of all my latest posts and notes on the topic.