16

I have uninstalled wsl on my windows 11 and trying to re-install using wsl --install. After restart i am getting following error

    Failed to attach disk 'C:\Users\<User>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND
kshashank
  • 571
  • 1
  • 2
  • 9

1 Answers1

31

From the WSL Github issue on the topic and the resulting discussion thread:

  1. List the distributions installed, by running following in PowerShell.

    wsl -l
    
  2. Unregister the distribution. Replace the "Ubuntu" below with your distribution name found in Step #1:

    wsl --unregister Ubuntu
    
  3. Launch the Ubuntu (or other distribution) which was installed using Microsoft Store

NotTheDr01ds
  • 17,574
  • 4
  • 44
  • 81
kshashank
  • 571
  • 1
  • 2
  • 9