If you want to reinstall Bash on Ubuntu on Windows, you can follow these steps. In the command prompt, run the following command to uninstall the currently installed version:
lxrun /uninstall /full
/full also removes the home folder. After that, you should be able to run a reinstall with the following command (theoretically):
lxrun /install /y
This does not work for me… I always get an error (I think it was this one:
Error: 0x80070091). Luckily, I am not the first one with that problem – the reason for that is the not-deleted
lxss folder in the local AppData directory. Before running the installation command, use the following one for removing the folder (I got the solution from a GitHub issue):
rmdir /S "\\?\C:\Users\Username\AppData\Local\lxss"
Of course, you need to replace
Username with your user name. Afterward, you can run
lxrun /install /y to start the installation (hopefully) without any errors.