microsoft / microsoft/WSL

Consider prompting the user during uninstall

Open
#11,671 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**

A WSL distro is installed with

```
wsl --install Ubuntu-22.04
```

However, it is uninstalled with

```
wsl --unregister Ubuntu-22.04
```

If you accidentally type:

```
wsl --uninstall Ubuntu-22.04
```

You're in for an exciting day.

**Describe the solution you'd like**

If extra arguments are provided, the command should error.

> You provided a distro to WSL uninstallation, perhaps you meant --unregister?

**Describe alternatives you've considered**

- Prompt the user to make sure this is the intended action

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the argument parsing and handling for `wsl --uninstall`, then compare it with the `--unregister` command shown in the issue. Done means that supplying a distro to `--uninstall` no longer proceeds silently and instead produces the requested error or confirmation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.