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
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 tool, but it only resets the Linux instance without deleting the files. However, this command would remove a distribution you restored from the backup.

This guide will teach you how to uninstall any Linux distribution on Windows 11 or 10.

Remove Linux distro on WSL from Settings

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 will no longer be available on Windows 10

Remove Linux distro on WSL from 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, the option to uninstall it won’t appear in 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 on Windows 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 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.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.