How to Reset WSL Linux Distro on Windows 11

By
Bhanu Pratap
He is a die-hard fan of tech and keeps track of every little happening in the field. When he is not writing, he usually keeps himself...
4 Min Read
Disclosure: This site uses affiliate links. We may earn a commission at no extra cost to you. Thanks for your support!
Reset WSL Linux Distro on Windows

Windows Subsystem for Linux (WSL) allows you to run a full Linux environment on your Windows machine. With WSL, you can run Linux distributions directly within Windows without the need for dual booting or virtual machines.

However, sometimes your Linux distribution on WSL may encounter issues such as corruption, performance problems, or configuration errors. In such cases, resetting the WSL Linux distribution is a great way to resolve these issues.

How to Reset WSL Linux Distro on Windows 11

In this guide, we’ll walk you through two methods for resetting your WSL Linux distro on Windows 11—one using Settings and the other through Command Prompt. This process will return your distribution to its default state without needing to uninstall or reinstall WSL.

1. Reset Linux Distro on WSL from Settings

This method is the easiest and most user-friendly way to reset your WSL Linux distro. Follow these steps:

1. Press Windows + I to open the Settings window.

2. In the Settings window, click on Apps from the left-hand sidebar.

3. Scroll down and click on Installed Apps.

Installed Apps Settings

4. Scroll through the list of installed applications until you find the Linux distribution you want to reset (e.g., Ubuntu, Debian, Fedora). You can also use the search bar at the top to quickly find your distribution.

5. Click on the three vertical dots next to the distribution name, and select Advanced Options.

Advanced Options in Installed Apps Menu

6. Under the Reset section, you will see a Reset button. Click on it to begin the reset process.

7. A confirmation dialog will appear asking if you’re sure you want to reset the distro. Confirm by clicking Reset again.

Reset Debian WSL

The process will take a few moments. Once it’s complete, the Linux distro will be restored to its original state. Your data and applications within the distribution will be erased, but WSL itself will remain installed.

After the reset, launch your Linux distro again. You’ll need to go through the initial setup process, including creating a user account and configuring your environment.

2. Reset Linux Distro on WSL from Command Prompt

If you prefer using the Command Prompt, you can reset your WSL Linux distro using the following steps:

1. Click on the Start button and open Command Prompt with administrator privileges.

2. In the Command Prompt, type the following command to list all installed WSL distributions. This will display a list of all the Linux distributions installed on your machine, along with their version and current status.

wsl --list

3. To reset a specific Linux distribution, use the unregister command. Replace <distro-name> with the name of the distribution you want to reset (e.g., Ubuntu):

wsl --unregister <distro-name> 

Example:

wsl --unregister Ubuntu
wls unregister linux distro

After unregistering the distro, it will no longer be available on the Windows Subsystem for Linux. However, the distribution will still be available on the device. If you want to register it again, open it from the Start menu and complete the setup process.

Conclusion

Resetting your WSL Linux distro on Windows 11 is a straightforward process that can help resolve issues like corruption, performance problems, or configuration errors. Whether you prefer using Settings or Command Prompt, both methods allow you to restore your Linux environment to its default state. While resetting will erase all your data and installed applications, it can be a helpful solution when other troubleshooting methods fail.

Once your distro is reset, you can start fresh, reinstall your desired packages, and continue using WSL as usual.

Want to see more helpful guides like this? Add thecoderworld as your preferred source on Google so our content appears more often in your feed.

Share This Article
Follow:
He is a die-hard fan of tech and keeps track of every little happening in the field. When he is not writing, he usually keeps himself busy on YouTube, creating and exploring new and awesome tech content.
Leave a Comment

Leave a Reply

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