Understanding Error 0x80070490
The error WslRegisterDistribution failed with error: 0x80070490 translates to ERROR_NOT_FOUND in Windows API terms, but in the context of WSL, it usually means the system cannot find the expected distribution metadata or files. This often happens after a Windows update, a failed installation, or if the Ubuntu package was manually deleted from the AppData folders while still registered in the WSL registry.
Unlike generic connectivity issues, this error prevents the distribution from starting at all. You will see the error message immediately when running wsl --list or attempting to launch Ubuntu from the Start menu. It is distinct from network errors or permission denied issues, focusing strictly on the existence and integrity of the distribution package itself.
Step 1: Reinstall the Ubuntu Distribution
The most reliable fix for this specific error is to remove the broken registration and reinstall the Ubuntu package. This ensures that all necessary AppX manifest files are correctly placed and registered with the Windows subsystem.
- Open PowerShell as Administrator: Right-click the Start button and select "Windows PowerShell (Admin)" or "Terminal (Admin)." Administrative privileges are required to modify WSL distributions.
- Remove the Broken Distribution: Run the following command to uninstall the current Ubuntu instance:
wsl --unregister Ubuntu-20.04
If you receive an error that the distribution does not exist, proceed to the next step anyway, as the corruption may be in the AppX package rather than the WSL registry entry.
- Reinstall via Microsoft Store: Open the Microsoft Store, search for "Ubuntu 20.04 LTS," and click Install. This method automatically handles the complex registration process.
Alternatively, if you prefer using PowerShell, you can add the package back using the Add-AppxPackage cmdlet, though the Store method is less prone to path errors.
Step 2: Clear WSL Cache Files
If reinstalling does not resolve the issue, residual cache files might be causing conflicts. WSL stores temporary data and virtual hard disk images in user-specific directories. Corrupted cache files can lead to registration failures even after a clean reinstall.
- Navigate to
%LOCALAPPDATA%\Packages\CanonicalGroupLimited.UbuntuonWindows_...\LocalState. - Delete the
ext4.vhdxfile if it exists. This file contains the root filesystem of your Ubuntu distribution. - Also check
%TEMP%\wsland delete any contents found there.
After clearing these files, attempt to launch Ubuntu again. The system will recreate the virtual hard disk from scratch during the first boot.
Step 3: Verify WSL Version Settings
Sometimes, the default WSL version setting interferes with older distributions like Ubuntu 20.04. While Ubuntu 20.04 supports both WSL1 and WSL2, misconfiguration can cause registration loops.
Check your current default version by running:
wsl -l -v
If Ubuntu is listed as version 1, try converting it to version 2 using:
wsl --set-version Ubuntu-20.04 2
Conversely, if it is stuck on version 2 and failing, try switching to WSL1 temporarily to see if the distribution launches. If it works on WSL1, the issue may be related to Hyper-V integration rather than the distribution package itself. For more details on managing WSL versions, see our guide on Difference between Windows WSL.
Step 4: Check for Conflicting Software
Certain antivirus programs or system optimization tools can lock files in the AppData directories, preventing WSL from registering the distribution. Temporarily disable third-party antivirus software and retry the installation.
Additionally, ensure that the "Virtual Machine Platform" and "Windows Subsystem for Linux" optional features are enabled in Windows Features. Go to "Turn Windows features on or off" and verify both checkboxes are selected. Restart your computer after making changes to these settings.
Alternative Solutions
If the standard reinstall fails, consider installing a newer version of Ubuntu, such as 22.04 LTS, which has better support and fewer legacy compatibility issues. Newer distributions are less likely to encounter registration errors due to improved packaging standards.
For users experiencing subsequent issues after fixing the registration, such as application crashes, refer to Error launching chrome on Ubuntu WSL for troubleshooting steps related to graphical applications.
Frequently Asked Questions
Why does WslRegisterDistribution fail with 0x80070490?
This error occurs when Windows cannot find the necessary files or metadata for the specified Linux distribution. It typically indicates a corrupted AppX package or a missing virtual hard disk file in the local storage directory.
Can I fix this without reinstalling Ubuntu?
In most cases, no. Since the error indicates a missing or corrupted package, the only reliable fix is to unregister the distribution and reinstall it. Manual file repairs are rarely successful because the AppX manifest must match the installed files exactly.
Does this error affect other Linux distributions?
No, this error is specific to the Ubuntu-20.04 distribution package. Other distributions like Debian or Kali Linux remain unaffected unless they share the same corrupted underlying WSL components, which is uncommon.
How do I know if my WSL is version 1 or 2?
Run the command wsl -l -v in PowerShell. The output will list each distribution along with its version number. If the version column shows "1" or "2", that is the active mode for that distribution.
Is it safe to delete the ext4.vhdx file?
Deleting the ext4.vhdx file will erase all data inside your Ubuntu distribution. It is safe to delete if you have backups or do not need the existing files, as WSL will create a new empty filesystem upon next launch.