Reinstalling Ubuntu WSL on Windows from PowerShell

This is when you want to throw your build out the window and start fresh:

wsl --unregister Ubuntu
wsl --install -d Ubuntu

Now 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 --verbose

Or the shorthand:

wsl -l -v

This will show output like:

  NAME                   STATE           VERSION
* Ubuntu-22.04           Running         2
  Debian                 Stopped         2
wsl --unregister <DistributionName>

For example:

wsl --unregister Ubuntu-22.04

Make a backup of anything you need before removing it.

image.png

 


Revision #3
Created 3 April 2024 07:01:20 by Nate Nash
Updated 7 June 2025 11:39:18 by Nate Nash