How to remove Linux distro from WSL

On Windows 11, you have at least three ways to remove any Linux distro from WSL, and here's how.

WSL remove Linux distro

Windows Subsystem for Linux (WSL) allows you to completely remove any Linux distribution (for example, Ubuntu, Kali, Mint, and Debian) in at least three ways, whether you are on Windows 11 or Windows 10.

Since Linux distros are available through the Microsoft Store, they are considered applications, which means you can use the Settings app and the Windows Package Manager (winget) command to uninstall any distribution.

You can also use the --unregister option with the wsl.exe command-line tool, but it only resets the Linux instance without deleting the files. However, this command would remove a distribution you restored from backup.

In this guide, you will learn how to uninstall any Linux distribution on Windows 11 or 10.

Remove Linux distro on WSL using the Settings app

Whether you have Windows 11 or Windows 10, the steps to use the Settings app to remove a Linux distro would be slightly different.

Uninstall WSL distro on Windows 11

To completely remove a Linux distro on WSL, use these steps:

  1. Open Settings on Windows 11.

  2. Click on Apps.

  3. Click the Installed apps page.

    Quick note: On version 21H2, the page’s name was “Apps & features.”
  4. Select the Linux distro, open the menu (three-dotted button) on the right side, and choose the “Uninstall” option.

    Windows 11 uninstall WSL distro

  5. Click the Uninstall option again.

Once you complete the steps, the Linux instance and the distribution will be removed from Windows 11.

Uninstall WSL distro on Windows 10

To uninstall a distro on Windows 10, use these steps:

  1. Open Settings.

  2. Click on Apps.

  3. Click on Apps & features.

  4. Select the Linux distro and click the Uninstall button.

    Windows 10 uninstall Linux distro on WSL

  5. Click the Uninstall button again.

After you complete the steps, the Ubuntu, Kali, Mint, Debian, or the specific distribution you may have will no longer be available on Windows 10

Remove Linux distro on WSL using Command Prompt or PowerShell

To remove any WSL distribution with commands on Windows 11 or 10, use these steps:

  1. Open Start.

  2. Search for Command Prompt (or PowerShell), right-click the top result, and select the Run as administrator option.

  3. Type the following command to list all the apps installed on Windows 11 and press Enter:

    winget uninstall

    winget uninstall command

  4. Type the following command to remove the Linux distro (Ubuntu, Debian, Kali, Mint, etc.) and press Enter:

    winget uninstall --id "DISTRO-ID-NAME"

    In the command, specify the name of the Linux distro to remove from Windows 11 completely. For example, this command removes the Ubuntu distro:

    winget uninstall --id Canonical.Ubuntu

    winget remove Linux distro on WSL

Once you complete the steps, the instance and distribution files will be removed from your computer.

Remove imported Linux distro on WSL with commands

If you imported a Linux distro from a backup on Windows 11 or 10, you won’t find the option to uninstall it from the Settings app, Command Prompt, or PowerShell. In this situation, you will need to unregister the distribution to delete it.

To remove a Linux distro after being imported (restored) from a backup, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to view a list of all available distros and press Enter:

    wsl --list
    Quick tip: You can also write the command like this: wsl -l.
  4. Type the following command to set a distro as the new default and press Enter:

    wsl --unregister DISTRO-NAME

    In the command, replace DISTRO-NAME with the name of the distro you want to set as default (see step No. 3). For example, this command unregisters and deletes the Ubuntu Linux distribution:

    wsl --unregister Ubuntu

    WSL unregister command

  5. Type the following command to confirm distros and press Enter:

    wsl --list

Once you complete the steps, the distro will reset and no longer be available in WSL, but it won’t be uninstalled from the computer. If you want to reinstall the distro, you can open it again from the Start menu.