Skip to content

wsl --uninstall should warn users it's **not** for removing distribution. #13979

Description

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:

  1. Make wsl --uninstall warn user of removing WSL entirely instead of removing distribution. Add -y to force-confirm.
  2. 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:

  1. Installing distribution in WSL is wsl --install Distro
  2. So, the opposite of --install is --uninstall.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions