Windows

How to Completely Uninstall WSL Distribution in Windows

In this tutorial, you will learn how the techniques you can use to uninstall and WSL distribution from your system. This tutorial is tested on the latest build of Windows 10 and the Development Version of Windows 11.
Captain Salem 2 min read
How to Completely Uninstall WSL Distribution in Windows

The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

WSL has been a revolutionary feature for us geeks and developers for many reasons. Whether you just want to dip your toes into Linux or a seasoned pro, no need to perform a dual boot.

However, you will come across an instance where you no longer need the installed Linux distribution on your system.

Method 1 - Uninstall WSL Distribution Using Windows Settings

The first and most common method you can use to remove any WSL distribution is using the Settings App. WSL distributions are treated as regular windows applications from the Windows store.

Hence to uninstall the distro from Settings,

Right Click the Start Menu and Select Settings.

image-20221123165106894

In the Settings App, Navigate to the Apps section.

image-20221123165216353

Navigate to the installed Apps section.

Locate the Linux distribution you wish to unistall and click on the three-dots icon. Select Uninstall to remove the distro from your system.

image-20221123165522027

Wait from the unistall process to complete. Once finished, your Linux distribution should be completely removed from your system.

Method 2 - Uninstall WSL Distro Using Windows Command Prompt or PowerShell

For most of us, we do not wish to navigate all the way to the settings up while we already have a terminal session up and running.

Therefore, we need a way to uninstall a WSL distribution from the terminal.

To unistall a WSL distro, run the command:

winget rm --name <distro_name>

For example:

winget rm --name Ubuntu

Example output:

Found Ubuntu [CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc]
Starting package uninstall...
  ██████████████████████████████  100%
Successfully uninstalled

Method 3 - Uninstall a Custom WSL Distro

In some cases, you may wish to remove a distro that is not available from the Windows Store.

An example is the Arch Linux.

https://www.geekbits.io/how-to-run-arch-linux-in-wsl/

In such case, you can install your distro by open the command prompt with administrive permissions.

Execute teh command:

wsl --unregister <distr_name>

The <distro_name>is the name of the distribution you wish to remove. You can find the distro name by runninng the command:

wsl --list

Output:

Windows Subsystem for Linux Distributions:
Debian (Default)
fedoraremix
Arch

For example, to uninstall Arch Linux:

wsl --unregister Arch

Final

Through this post, you discovered 3 main ways of uninstalling a WSL distribution from your Windows 10 or Windows 11 system.

Leave us a comment down below and share with your friends.

If you enjoy our content, please consider buying us a coffee to support our work:

Share
Comments
More from GeekBits

Join us at GeekBits

Join our members and get a currated list of awesome articles each month.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to GeekBits.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.