Where on the file system does Bash for Windows get installed?

If I find that it becomes bloated (because over time I installed a lot of apt packages or something) what is the best way to purge it and start over?

I know that it downloads and initializes on the first run, so I was wondering if I could simply delete the folder where it is stored and start over again, make back ups, manage multiple versions of my workspace, etc...



Resetting the Bash Subsystem is pretty easy. To uninstall it fully, use the following command:

lxrun /uninstall /full

To reinstall it, use this command:

lxrun /install

This will re-download it from the Windows Store - it is not that large and you will get a completely fresh copy. If you really screw up, re-downloading might be the only way to go.

  • How much space does the Bash Subsystem use in total for a fresh install? – Manachi May 3 '17 at 1:38

Starting with the Windows 10 Fall Creators Update, you must use wslconfig (instead of lxrun) to manage the WSL distributions. You can read the documentation from Microsoft.

Note that you can install multiple linux distributions in your WSL. To list the distributions you have, you can use:

wslconfig /list /all

To remove a distribution, you must unregister it. The WSL will keep the installer but it will remove all the programs and user data.

wslconfig /unregister <DistributionName>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.