UPDATED 7/6/2024: 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.
In this guide, I will teach you how to uninstall any Linux distribution on Windows 11 or 10.
- Remove Linux distro on WSL from Settings
- Remove Linux distro on WSL from Command Prompt or PowerShell
- Remove imported Linux distro on WSL with commands
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:
-
Open Settings on Windows 11.
-
Click on Apps.
-
Click the Installed apps page.
-
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 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:
-
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 --list
-
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 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:
-
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 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
-
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 free up space on your computer, you will have to delete files manually from the folder location. On the other hand, if you want to reinstall the distro, you can open it again from the Start menu.
Update July 6, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.