Is your feature request related to a problem? Please describe.
wsl --install Distro is the command-line option to install distribution. So that means user expects wsl --uninstall Distro is the command-line to uninstall distribution.
Unfortunately, it's not. wsl --uninstall regardless if you add the distribution name or not, removes the whole WSL installation. Removing distribution is wsl --unregister Distro instead. I think this is bit confusing.
Describe the solution you'd like
I can think of 2 solutions:
- Make
wsl --uninstall warn user of removing WSL entirely instead of removing distribution. Add -y to force-confirm.
- Make
wsl --uninstall Distro an alias to wsl --unregister Distro.
Both solution is not mutually exclusive, so either one of them or both can be implemented.
Describe alternatives you've considered
The alternative is to read the command-line options.
Additional context
From user perspective, it makes sense to think like this:
- Installing distribution in WSL is
wsl --install Distro
- So, the opposite of
--install is --uninstall.
- That means
wsl --uninstall Distro should be the command to uninstall a distribution.
Fotunately no data loss is observed when running wsl --uninstall followed by wsl --install Distro. At least, the existing distribution is still there.
Is your feature request related to a problem? Please describe.
wsl --install Distrois the command-line option to install distribution. So that means user expectswsl --uninstall Distrois the command-line to uninstall distribution.Unfortunately, it's not.
wsl --uninstallregardless if you add the distribution name or not, removes the whole WSL installation. Removing distribution iswsl --unregister Distroinstead. I think this is bit confusing.Describe the solution you'd like
I can think of 2 solutions:
wsl --uninstallwarn user of removing WSL entirely instead of removing distribution. Add-yto force-confirm.wsl --uninstall Distroan alias towsl --unregister Distro.Both solution is not mutually exclusive, so either one of them or both can be implemented.
Describe alternatives you've considered
The alternative is to read the command-line options.
Additional context
From user perspective, it makes sense to think like this:
wsl --install Distro--installis--uninstall.wsl --uninstall Distroshould be the command to uninstall a distribution.Fotunately no data loss is observed when running
wsl --uninstallfollowed bywsl --install Distro. At least, the existing distribution is still there.