How do I reset my installation of Ubuntu on Windows?
You can reset Ubuntu from settings, just find it in the start menu, right-click to go to App settings
, then press the reset
button.
Open Command Prompt (AKA cmd.exe
), and type lxrun /uninstall
. That should wipe your Ubuntu image.
Once this is done, you can reinstall with lxrun /install
.
References:
- https://blogs.windows.com/buildingapps/2016/07/22/fun-with-the-windows-subsystem-for-linux/
With the new distro-specific store apps, for example:
C:\> ubuntu /?
Launches or configures a linux distribution.
Usage:
<no args>
- Launches the distro's default behavior. By default, this launches your default shell.
...
clean
- Uninstalls the distro. The appx remains on your machine. This can be
useful for "factory resetting" your instance. This removes the linux
filesystem from the disk, but not the app from your PC, so you don't
need to redownload the entire tar.gz again.
So, ubuntu clean
should be enough.
If ubuntu clean
fails, then you'll have to uninstall the app from the store and reinstall it. See WSL #2387.