Skip to content

Instantly share code, notes, and snippets.

@ishu3101
Created July 22, 2016 23:38
Show Gist options
  • Star 26 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save ishu3101/a7a212e2e40080927da8413c3c8aafbb to your computer and use it in GitHub Desktop.
Save ishu3101/a7a212e2e40080927da8413c3c8aafbb to your computer and use it in GitHub Desktop.
Resetting your Windows Subsystem for Linux (WSL) Environment
# Resetting your Windows Subsystem for Linux (WSL) Environment
lxrun.exe /uninstall /full
lxrun.exe /install
@gowinder
Copy link

nice

@kenanchristian
Copy link

Stuck on uninstall, anything I can do to reinstall?

@neilbalch
Copy link

Just be sure you delete all of the contents of AppData\Local\lxss* before you run lxrun.exe /install

@zoiosilva
Copy link

Perfect!

@jensdebruijn
Copy link

The subsystem can now be remove by simply uninstalling from the start menu and reinstalled from the Microsoft Store

@anonusername
Copy link

The subsystem can now be remove by simply uninstalling from the start menu and reinstalled from the Microsoft Store

Gross

@MattVonVielen
Copy link

This no longer works, at least for me. What was once two command lines now involves at least two apps - settings/control panel to uninstall and windows store to reinstall. What a crappy UX.

@owennewo
Copy link

owennewo commented Jul 5, 2019

In wsl2 there is a way to repair or reset the distro (possibly a Ubuntu only option) without wiping wsl2. Not what quite what you asked for but quicker, I suspect.

For example if you've installed ubuntu from windows store then go to 'add/remove programs' then find 'Ubuntu' and then go to advanced options - you then have the option of repair/reset/terminate/uninstall

@stevenlafl
Copy link

In wsl2 there is a way to repair or reset the distro (possibly a Ubuntu only option) without wiping wsl2. Not what quite what you asked for but quicker, I suspect.

For example if you've installed ubuntu from windows store then go to 'add/remove programs' then find 'Ubuntu' and then go to advanced options - you then have the option of repair/reset/terminate/uninstall

Doesn't work for me. The Windows Subsystem for Linux instance has terminated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment