microsoft / microsoft/WSL

wsl --unregister <Distro> should warn users that their data will be permanently deleted.

Open
#9,932 62 comments 59 reactions 1 assignee View on GitHub

@benhillis is already working on this.

Since Apr 9, 2023.

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

Description

### Windows Version

Microsoft Windows [Version 10.0.22621.1413]

### WSL Version

1.1.6.0

### Are you using WSL 1 or WSL 2?

- [X] WSL 2
- [ ] WSL 1

### Kernel Version

5.15.90.1

### Distro Version

Ubuntu 20.04

### Other Software

_No response_

### Repro Steps

wsl --unregister

### Expected Behavior

After running the command line, the program should ask the user to answer yes or no regarding the permanent removal of the distribution.

Example:
```
wsl --unregister
Are you sure you want to permanently delete ? (yes/no)
```

This will prevent more users from mistakenly deleting all their information as it has been reported on multiple occasions.

For automation purposes, an extra flag should be added to skip the message (e.g., --force).

Example:
```
wsl --unregister --force
```

### Actual Behavior

No warnings are prompt to the user. WSL 2 deletes the distribution without asking the user.

### Diagnostic Logs

_No response_

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.