Reinstalling Ubuntu WSL on Windows from PowerShell
This is when you want to throw your build out the window and start fresh:
wsl --unregister Ubuntuwsl --install -d UbuntuNow you can start with a fresh install of Ubuntu in Windows Subsystem for Linux.
To list all registered WSL distributions on your PC, run this command:
wsl --list --verboseOr the shorthand:
wsl -l -vThis will show output like:
  NAME                   STATE           VERSION
* Ubuntu-22.04           Running         2
  Debian                 Stopped         2- 
The *indicates the default distribution.
- 
You can then unregister any of them using: 
wsl --unregister <DistributionName>For example:
wsl --unregister Ubuntu-22.04Make a backup of anything you need before removing it.
 
                
No Comments