How to Remove or Uninstall Ubuntu Linux on Windows WSL

|

|

The article provides a detailed guide on multiple methods to uninstall Ubuntu Linux from Windows 11 using the Windows Subsystem for Linux (WSL). The tutorial includes instructions on uninstalling Ubuntu via the Settings app, Command Prompt, and wsl.exe. It commences by accessing the Windows Settings app and ends with running commands in the Command Prompt…

This article describes the steps to completely uninstall or delete a Ubuntu Linux distribution on Windows 11 with WSL.

Windows Subsystem for Linux lets developers run a GNU/Linux environment directly in Windows without setting up a virtual machine or dual-boot, including most command-line tools, utilities, and applications.

If you no longer want to run a Ubuntu Linux distribution within your Windows WSL environment, Windows allows you to remove it in multiple ways.

Ubuntu Linux and other Linux distributions are available through the Microsoft Store, which is considered an application. Since they are applications, you can use the Windows Settings app, or the Command Prompts to uninstall these distributions.

Below is how to uninstall Ubuntu Linux on Windows with WSL.

How to uninstall Ubuntu Linux on Windows WSL

As described above, if you no longer want to run a Ubuntu Linux distribution within your Windows WSL environment, Windows allows you to remove it in multiple ways.

Below are some ways to uninstall the Ubuntu Linux distribution on Windows 11 WSL.

Uninstall Ubuntu Linux on Windows WSL via the Settings app

Users can remove or uninstall a Ubuntu Linux from the Windows WSL environment via the Settings app.

Since Linux distributions are installed through the Microsoft Store, they are considered apps and can be removed or uninstalled like any app.

First, open the Windows Settings app. You can access the Settings app by clicking on the Start button and selecting Settings.

When the Settings app opens, go to Apps -> Installed apps (Apps & features). Find the Ubuntu Linux app on the list of installed apps, click on the menu option (three dots on the right), and select Uninstall.

Uninstall Ubuntu Linux on Windows WSL via Command Prompt

Another way one can remove or uninstall Ubuntu Linux from the Windows WSL environment is via the command prompt.

First, open the Command Prompt or Windows PowerShell as administrator.

To list all installed apps, run the commands below.

winget list

This will list all installed packages. From the list, identify the Ubuntu Linux package.

Name                                                         Id                                                  Version             Available Source
-----------------------------------------------------------------------------------------------------------------------------------------------------
Visual Studio Community 2022                                 Microsoft.VisualStudio.2022.Community               17.4.0              17.4.1    winget
HP Smart                                                     AD2F1837.HPPrinterControl_v10z8vjag6ke6             140.1.307.0
Ubuntu on Windows                                            Canonical.Ubuntu                                    2004.2022.1.0                 winget
Microsoft Edge                                               Microsoft.Edge                                      107.0.1418.42                 winget
Microsoft Edge Update                                        Microsoft Edge Update                               1.3.171.37
Microsoft Edge WebView2 Runtime                              Microsoft.EdgeWebView2Runtime                       107.0.1418.42                 winget
Cortana                                                      Microsoft.549981C3F5F10_8wekyb3d8bbwe               4.2204.13303.0
App Installer                                                Microsoft.DesktopAppInstaller_8wekyb3d8bbwe         1.18.2691.0
Xbox                                                         Microsoft.GamingApp_8wekyb3d8bbwe                   2211.1001.24.0
Get Help                                                     Microsoft.GetHelp_8wekyb3d8bbwe                     10.2208.2551.0
Microsoft Tips                                               Microsoft.Getstarted_8wekyb3d8bbwe                  10.2207.2.0
HEIF Image Extensions                                        Microsoft.HEIFImageExtension_8wekyb3d8bbwe          1.0.43012.0

Under the package ID column, location the name of the package. Use the command format below to uninstall the package.

winget uninstall --id "UbuntuPackageName"

For example, run the commands below to uninstall Ubuntu.

winget uninstall --id Canonical.Ubuntu

Uninstall Ubuntu Linux from Windows WSL via wsl.exe

If the Ubuntu Linux distribution was imported, you might not find it under the installed apps section. You may have to run the commands below to uninstall.

Open the Command Prompt or Windows PowerShell as administrator.

Then run the commands below to list the Ubuntu Linux distros.

wsl --list

Run the command format below.

wsl --unregister Ubuntu-linux-name

For example, run the commands to uninstall Ubuntu.

wsl --unregister Ubuntu

That should do it!

Conclusion:

This post showed you how to uninstall Ubuntu Linux from the Windows WSL environment. Please use the comment form below if you find any errors above or have something to add.

Like this:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.