Reset and Unregister WSL Linux Distro in Windows 10

In Windows 10, you can unregister a WSL Linux distro to reset it to defaults. After resetting, the next time you start it, Windows will install a clean non-configured copy of the distro, so you set it up from scratch, create a new user and set its password, and install some apps you need.

The ability to run Linux natively in Windows 10 is provided by the WSL feature. WSL stands for Windows Subsystem for Linux, which initially, was limited to Ubuntu only. Modern versions of WSL allow installing and running multiple Linux distros from Microsoft Store.

Linux Distros Microsoft Store Windows 10

Tip: Here's how to tweak your PC to ensure top performance for a specific type of task, be it gaming, document work or something else.

After enabling WSL, you can install various Linux versions from the Store. You can use the following links:

  1. Ubuntu
  2. openSUSE Leap
  3. SUSE Linux Enterprise Server
  4. Kali Linux for WSL
  5. Debian GNU/Linux

and more.

When you start a WSL distro for the first time, it opens a console window with a progress bar. After a moment of waiting, you will be prompted to type a new user account name, and its password. This account will be your default WSL user account that will be used to sign-in automatically every time you run the current distro. Also, it will be included in the 'sudo' group in order to allow it to run commands elevated (as root).

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.

There are two ways to reset a WSL Linux distro in Windows 10. Yiou can use either Settings, or a console tool, wsl.exe.

To Reset a WSL Linux Distro in Windows 10,

  1. Open the Settings app.
  2. Go to Apps -> Apps & features.
    Settings Apps Apps And Features
  3. On the right, look for the installed WSL distro you want to reset and click it.
  4. The Advanced options link will appear. Click it to open the next page.Ubuntu WSL In Apps And Features
  5. Under the Reset section, click on the Reset button.Windows 10 Reset WSL Distro
  6. Now, you can run your WSL distro to configure it and setup the environment you need.Ubuntu Console Appearance For Bash In Windows 10 Original

You are done.

Alternatively, you can use the wsl.exe console tool to unregister a WSL distro. Unregistering allows distributions to be reinstalled. Once unregistered, all data, settings, and software associated with that distribution will be permanently lost. Reinstalling from the store will install a clean copy of the distribution.

To Unregister a WSL Linux Distro in Windows 10,

  1. Open a new command prompt.
  2. Find available WSL distros by executing the following command: wls --list --all, or simply wsl -l --all.Windows 10 List WSL Distros
  3. Issue the command wsl --unregister <DistributionName>. Substitute <DistributionName> with the actual name of the a WSL distro installed on your computer, for example kali-linux.Windows 10 Unregister WSL Distro

You are done!

This will would remove your WSL distro from the distributions available in WSL. When you run wsl --list it will not be listed. To reinstall it, find the distribution in the Windows Store and select "Launch".

Windows 10 Reinstall WSL Distro 3

Alternatively, you can run it directly from the command prompt. Type one of the following commands:

  • Ubuntu: ubuntu
  • openSUSE Leap 42: openSUSE-42
  • SUSE Linux: SLES-12
  • Debian: debian
  • Kali Linux: kali

Windows 10 Reinstall WSL Distro 1 Windows 10 Reinstall WSL Distro 2

Articles of interest:

Driver Updater

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.