If you’re an avid user of Windows Subsystem for Linux (WSL), encountering errors can be quite disruptive. One stubborn issue many users face is the “WslRegisterDistribution failed with error: 0x80070050”. While it might look cryptic, it’s often fixable with a few guided steps. This error typically occurs due to conflicts in registry entries, file duplication, or attempt to install a distribution that already exists under the same name.
In this article, we’ll walk you through what causes the 0x80070050 error and more importantly, how to fix it efficiently and get back to your Linux development environment on Windows.
What Does Error Code 0x80070050 Mean?
Error 0x80070050 stands for “The file exists”. This is a Windows system error indicating that some component — usually a file or registry entry — already exists and is preventing the operation from completing. When you try to install or register a WSL Linux distribution and get this error, it’s likely because:
- You’ve previously installed the same distribution and haven’t fully removed it.
- Registry entries from an old installation weren’t cleaned properly.
- The distribution folder still exists inside the WSL environment or AppData.
This interference leads WSL to throw the error and prevent the proper registration of the Linux distribution you’re trying to install or use.

How to Fix WslRegisterDistribution Failed Error 0x80070050
The fix for this error is straightforward and usually doesn’t require a complete reinstall of WSL. Here’s a step-by-step guide to help you resolve it:
1. Unregister the Existing Distribution
If the distribution exists from a prior installation, start by unregistering it:
wsl --unregister <DistributionName>
Replace <DistributionName> with the actual name, such as Ubuntu or Debian. This command should remove the existing distribution completely.
Warning: This process will delete all data and settings in that WSL instance, so back up any important files beforehand.
2. Check for Leftover Distribution Folders
Sometimes, even after unregistering, remnants of the distribution stay behind. Navigate to the AppData folder and check:
C:\Users\[YourUsername]\AppData\Local\Packages
Look for folders related to your distribution, usually named something like:
- CanonicalGroupLimited…Ubuntu…
- Debian…DebianGNULinux…
If found, delete them manually. Be cautious to only delete directories related to WSL distributions to prevent loss of unrelated data.
3. Clean Up the Windows Registry
If the error still persists, remnants in the Windows Registry could be at fault. Here’s how to clean it:
- Press Win + R, type regedit, and press Enter.
- Navigate to the following key:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Here you’ll see subkeys for installed distributions. If you recognize one pointing to the name you’re trying to reuse, right-click and delete the key.
Make sure to back up the registry before making changes.
4. Restart Your System
After cleaning up files and the registry, it’s a good idea to restart your computer. This ensures that Windows resets any cached WSL settings.
5. Reinstall the Distribution
After rebooting, reopen PowerShell or the Microsoft Store and reinstall your desired Linux distribution. It should now register cleanly without throwing the 0x80070050 error.
For example, in PowerShell:
wsl --install -d Ubuntu
If all steps were followed correctly, this command should execute successfully.

Additional Tips
Still running into trouble? Here are some more things to try:
- Update Windows: WSL is heavily integrated with the Windows kernel. Keeping your OS updated ensures compatibility and access to bug fixes.
- Use WSL 2: WSL 2 has improved architecture and better support. Use the following command to set WSL 2 as your default:
wsl --set-default-version 2
- Enable Virtual Machine Platform: Make sure the following Windows feature is enabled from “Turn Windows features on or off”:
- Windows Subsystem for Linux
- Virtual Machine Platform
Conclusion
While the WslRegisterDistribution Failed Error 0x80070050 can bring your workflow to a halt, it’s usually caused by lingering system entries that can be cleared with a few manual steps. Whether it’s residual registry keys or leftover folders, a bit of cleanup will get your Linux distro up and running again.
By following the steps outlined above, you’ll be back to coding, compiling, and managing your projects from WSL in no time.