
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 that 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 the different ways to uninstall any Linux distribution on Windows 11 or Windows 10.
- Remove Linux distro on WSL using the Settings app
- Remove Linux distro on WSL using Command Prompt or PowerShell
- Remove imported Linux distro on WSL with commands
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:
-
Open Settings.
-
Click on Apps.
-
Click the Apps & features page on the right side.
-
Select the Linux distro, open the menu (three-dotted button) on the right side, and choose the “Uninstall” option.
-
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:
-
Open Settings.
-
Click on Apps.
-
Click on Apps & features.
-
Select the Linux distro and click the Uninstall button.
-
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:
-
Open Start.
-
Search for Command Prompt (or PowerShell), right-click the top result and select the Run as administrator option.
-
Type the following command to list all the apps installed on Windows 11 and press Enter:
winget uninstall
-
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
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 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 backup, use these steps:
-
Open Start.
-
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
-
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
. -
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 for 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
-
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.