Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10  

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10

    How to Unregister and Reset Windows Subsystem for Linux (WSL) Distro in Windows 10
    Published by Category: Apps & Features
    29 Jul 2020
    Designer Media Ltd

    How to Unregister and Reset Windows Subsystem for Linux (WSL) Distro in Windows 10


    The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

    When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store.

    The first time a newly installed WSL distro runs, a Console window will open, and you'll be asked to wait for a minute or two for the installation to complete.

    Once installation is complete, you will be prompted to create a new user account (and its password).

    Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:
    1. It is your default user -- it signs-in automatically on launch.
    2. It is Linux administrator (a member of the sudo group) by default.

    Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

    If needed, you can unregister a WSL distro to reset it back to default for your account. Once unregistered, all users, data, settings, and software associated with that distribution will be permanently lost. The unregistered WSL distro will be removed from the available WSL distros list.

    When you run the unregisted WSL distro app next, a clean copy of the distro will be installed allowing you to also setup the distro with a new UNIX username and password.

    Starting with Windows 10 build 18342 (19H1) and Windows 10 build 18836 (20H1), Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

    See also:

    This tutorial will show you how to unregister and reset a Windows Subsystem for Linux (WSL) distro to default settings for your account in Windows 10.

    If you unregister an imported WSL distro, it will be completely removed/uninstalled.



    Contents

    • Option One: Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in Settings
    • Option Two: Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in Command Prompt
    • Option Three: Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in PowerShell






    OPTION ONE

    Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in Settings


    1 For how to reset a WSL distro app in Settings, see: How to Reset an App in Windows 10

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-reset_and_unregister_wsl_distro_settings.png

    2 You can now run this WSL distro app to reinstall and setup the distro with a new UNIX username and password. (see screenshot below)

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-wsl_distro_setup.jpg






    OPTION TWO

    Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in Command Prompt


    1 Open a command prompt.

    2 Copy and paste the command below for your version of Windows 10 into the command prompt, and press Enter. Make note of the name of the available WSL distro you want to unregister. (see screenshot below)

    (For Windows 10 version 1903 and later)
    wsl --list --all or wsl -l --all

    OR

    (For versions earlier than Windows 10 version 1903)
    wslconfig /list /all or wslconfig /l /all

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-list_all_wsl_distros.png

    3 Type the command below for your version of Windows 10 into the command prompt, and press Enter. (see screenshot below)

    (For Windows 10 version 1903 and later)
    wsl --unregister <DistributionName>

    OR

    (For versions earlier than Windows 10 version 1903)
    wslconfig /unregister <DistributionName>

    Substitute <DistributionName> in the command above with the actual WSL distro name (ex: "Ubuntu") from step 2 you want to unregister.

    For example: wsl --unregister Ubuntu

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-unregister_wsl_distro_command_prompt.png


    4 When finished, you can close the command prompt if you like.

    5 You can now run this WSL distro app to reinstall and setup the distro with a new UNIX username and password. (see screenshot below)

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-wsl_distro_setup.jpg






    OPTION THREE

    Unregister and Reset a Windows Subsystem for Linux (WSL) Distro in PowerShell


    1 Open PowerShell.

    2 Copy and paste the command below for your version of Windows 10 into PowerShell, and press Enter. Make note of the name of the available WSL distro you want to unregister. (see screenshot below)

    (For Windows 10 version 1903 and later)
    wsl --list --all or wsl -l --all

    OR

    (For versions earlier than Windows 10 version 1903)
    wslconfig /list /all or wslconfig /l /all

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-list_all_wsl_linux_distros_in_powershell.png

    3 Type the command below for your version of Windows 10 into PowerShell, and press Enter. (see screenshot below)

    (For Windows 10 version 1903 and later)
    wsl --unregister <DistributionName>

    OR

    (For versions earlier than Windows 10 version 1903)
    wslconfig /unregister <DistributionName>

    Substitute <DistributionName> in the command above with the actual WSL distro name (ex: "Ubuntu") from step 2 you want to unregister.

    For example: wsl --unregister Ubuntu

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-unregister_wsl_distro_powershell.png


    4 When finished, you can close PowerShell if you like.

    5 You can now run this WSL distro app to reinstall and setup the distro with a new UNIX username and password. (see screenshot below)

    Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10-wsl_distro_setup.jpg


    That's it,
    Shawn






  1. Posts : 841
    Windows 10 Pro 21H2
       #1

    "'wsl' is not recognized as an internal or external command"
      My Computer


  2. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    rdwray said:
    "'wsl' is not recognized as an internal or external command"
    Hello mate,

    Which version of Windows 10 do you currently have installed?

    Did you already enable WSL and installed a WSL distro app?
      My Computers


  3. Posts : 841
    Windows 10 Pro 21H2
       #3

    I am running 1909, 18363.959 and I had Ubuntu installed and then uninstalled it. I have disabled SubSystem in Control Panel.
      My Computer


  4. Posts : 68,840
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    rdwray said:
    I am running 1909, 18363.959 and I had Ubuntu installed and then uninstalled it. I have disabled SubSystem in Control Panel.
    That would most likely be why the command is not available then.
      My Computers


  5. Posts : 841
    Windows 10 Pro 21H2
       #5

      My Computer


 

Tutorial Categories

Unregister Windows Subsystem for Linux (WSL) Distro in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:35.
Find Us




Windows 10 Forums