How to remove wsl distro from windows?

Viewed 3035

I've installed docker desktop on my windows 10. Then I discovered WSL. After writing command wsl -l -v I saw that I had 2 distros:

docker-desktop-data
docker-desktop

I've also installed Ubuntu 20.04 from Microsoft Store and now I also have

Ubuntu-20.04

Now I want to get rid of these 2. I don't need so many of them. I know that docker-desktop-data contains images docker-desktop contains the docker infrastructure. But it's still unclear to me and confusing. I want to use Ubuntu-20.04 for my docker experiments only.

How do I delete these?

enter image description here

2 Answers

If after uninstalling docker you still see docker-desktop-data

You can remove it with the following command:

wsl --unregister docker-desktop-data

You can list distros with the following command:

wsl -l
Related