WSL icon indicating copy to clipboard operation
WSL copied to clipboard

apt-get update && apt-get upgrade fails

Open hensondeveloper opened this issue 10 years ago • 2 comments

Muscle-memory had me entering an

apt-get update && apt-get upgrade

Which had some issues with udev, systemd, and initramfs-tools.

For mitigation, is there a way to reset the bash environment on Windows 10?

hensondeveloper avatar Apr 11 '16 14:04 hensondeveloper

Issue #4 ultimately had the commands to completely uninstall Bash (allowing you to reinstall cleanly).

To summarize, as they were spread over a couple comments, you ultimately end up with:

Run the following from an Adminstrator (i.e. "elevated") Command Prompt lxrun /uninstall /full sc stop lxssmanager rmdir /S "\\?\%LOCALAPPDATA%\lxss"

mphaney avatar Apr 11 '16 15:04 mphaney

lxrun /uninstall should be enough to get you out of most states. lxrun /uninstall /full should only be required if you need to uninstall your Linux home directory.

Note that lxrun /uninstall will not work correctly if you have any files open. In that case the sc stop and rmdir will force your system to clean up.

russalex avatar Apr 11 '16 16:04 russalex