How to downgrade Wsl2 to wsl1?

12,327

Solution 1

The method is described on Microsoft Site: https://docs.microsoft.com/en-us/windows/wsl/install-win10

How to set your wsl instance version

  1. First list your distribution

    C:\WINDOWS\system32>wsl --list
    Windows Subsystem for Linux Distributions:
    Ubuntu-18.04 (Default)
    
  2. And then set it to version 1

    C:\Users\priv>wsl --set-version Ubuntu-18.04 1
    

But if your problem is your rootfs, you might need to reset your instance like matigo's answer suggested.

Solution 2

I do not believe you can downgrade, but you can completely reset WSL2 with a couple of commands:

  1. Open Command Prompt
  2. "Uninstall" WSL2:
    lxrun.exe /uninstall /full
    
  3. Delete everything in AppData\Local\lxss*
  4. Re-install WSL2:
    lxrun.exe /install
    

Alternatively, depending on which version of Windows you're using:

  1. Open "Add/Remove Programs"
  2. Find "Ubuntu" and access the advanced options
  3. Choose from:
    • repair ⇢ attempts to fix any broken configuration files
    • reset ⇢ returns the installation to default (same as the process above)
    • terminate ⇢ kill the VM, darn the consequences
    • uninstall ⇢ remove WSL2 from the system
Share:
12,327

Related videos on Youtube

Hasti fallah
Author by

Hasti fallah

Updated on September 18, 2022

Comments

  • Hasti fallah
    Hasti fallah over 1 year

    I'm using wsl 2 currently but it seems I can't run Ubuntu with it anymore. So I want to downgrade my wsl from 2 to 1

    • Rinzwind
      Rinzwind about 3 years
      The way you address this makes it a windows question: maintaining WSL is done from Windows tools. if you want to answer the reason for why you can not run Ubuntu find error(s) notice(s) and we can have a look at them In theory your problem could be hardware related and installing wsl1 might not be a fix.
  • Hasti fallah
    Hasti fallah about 3 years
    Thanks a lot. I already reset my wsl but it didn't work for me.
  • Hasti fallah
    Hasti fallah about 3 years
    Do you think it's because of my storage?my storage is full