ubuntu / ubuntu/WSL

Remove `wsl --unregister DISTRO_NAME` from the recommended commands to be run when "something goes wrong"

Open
#307 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
200
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Description

I had the below two windows updates performed

  • Cumulative Update for Windows 11 Insider Preview (10.0.22623.870) (KB5018499)
  • Update Stack Package - (Version 1022.1018.1012.0)

And on restart I see a window saying "Something went wrong". And was asked to run the following commands

Something went wrong.
Please restart WSL with the following command and try again:
wsl --shutdown
wsl --unregister DISTRO_NAME

But wsl --unregister DISTRO_NAME is a dangerous command and should not be run by the uninitiated.

--unregister <Distro>
    Unregisters the distribution and deletes the root filesystem.

This does not seem to be a Windows WSL issue. I was redirected to this repo - here is my original issue raised in microsoft/WSL#9049

I've attached the image of the window asking me to run wsl --unregister DISTRO_NAME

image

Need and use case

No warning is currently given when asking the user to run wsl --unregister DISTRO_NAME .

I had previously faced this same issue ("Something went wrong") and had unknowingly ran wsl --unregister (link to my previous issue - microsoft/WSL#8992 ). Which resulted me in loosing my data, I've recovered since then. But adding a warning to let future users know of the consequence would be great.

Additional information

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.

Research direction

Search the Ubuntu/WSL repository for the exact wsl --unregister DISTRO_NAME text and inspect the entry point that assembles the “Something went wrong” guidance. Remove that recommendation, then verify the displayed recovery instructions no longer include the destructive command.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.