Uninstall Linux distributions using options

Uninstall Linux distributions using options

If you no longer need to run your Linux machine, it is recommended that you remove the distros and then disable WSL.

To uninstall a Linux distribution, do the following:

  1. Open Settings.
  2. Click Applications.
  3. Click on Apps and features.
  4. Under the “Applications and features” section, select a distribution – for example, Ubuntu.
  5. Click the Delete button.: Windows Central
  6. Click the Delete button and click again to confirm.

After completing the steps, your Linux installation will be uninstalled and you can proceed with the steps to disable WSL.

Disable the Windows Subsystem for Linux using Settings

To disable WSL in Windows 10, follow these steps:

  1. Open Settings.
  2. Click Applications.
  3. Under the Related Settings section, click the Programs and Features option.
  4. Click the Turn Windows features on or off option from the left panel. Source: Windows Central
  5. Disable the Windows Subsystem for Linux option.Disable the Windows Subsystem for Linux Source: Windows Central
  6. Click the OK button.
  7. Click the Restart Now button.

After completing the steps, the Linux Subsystem for Windows will be removed from the device.

How to Install Windows Subsystem for Linux Using PowerShell

Additionally, if you don’t have access to the Windows GUI or are comfortable using command lines, you can use PowerShell to enable the Windows Subsystem for Linux, download and install Linux distros, and roll back all changes.

Add a subsystem using PowerShell for Windows

To install Windows Subsystem for Linux using PowerShell, follow these steps:

  1. Open Start.
  2. Search for PowerShell, right-click on the top result, and select the Run as administrator option.
  3. To enable the Linux subsystem, type the following command and press Enter :Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-
  4. Type Y and press Enter to confirm and restart your computer.

After completing the steps, you can follow the instructions to download and install any compatible Linux distribution available through the Microsoft Store.

Installing Linux distributions using PowerShell

To download and install a Linux distro (such as Ubuntu) using PowerShell, do the following:

  1. Open Start.
  2. Search for PowerShell, right-click on the top result, and select the Run as administrator option.
  3. To select the download folder, type the following command and press Enter:cd c:PATHTODESTINATION-FOLDERThis example goes to the data folder at the root of the main drive:cd c:data
  4. To boot Ubuntu, type the following command and press Enter :Invoke-WebRequest -Uri https://wsldownload.azureedge.net/Ubuntu_1604.2019.523.0_x64.appx -OutFile Ubuntu.appx -UseBasicParsingDestiny 2 Is The Best Exotic
  5. Windows CentralThe above command will boot Ubuntu 16.04, but you may need to update the boot distro name and version. Quick note: Although the link in this step and the screenshot are different, they are actually the same. This is just a short version of the screenshot.
  6. To see the exact name of the installer, type the following command and press Enter :dir
  7. To install Ubuntu 16.04, type the following command and press Enter :Add-AppxPackage .APP-NAME.appxThis example installs an Ubuntu distro on Windows 10:Add-AppxPackage .Ubuntu.appxInstall Ubuntu on WSL using PowerShellSource: Windows Central
  8. Open Start.
  9. Search for a recently released Linux distribution (eg Ubuntu ), and click on the top result to start experimenting.
  10. Create a username for your Linux distribution and click Enter.
  11. Specify the distribution password and press Enter.On Ubuntu WSL initializationSource: Windows Central
  12. Repeat the password and click Enter to accept.

After following the steps, you can start Ubuntu or any other distribution just like a full installation of Linux without GUI.

Uninstall a Linux distro using PowerShell

If you want to revert your changes, you’ll want to remove any Linux distros first before shutting down WSl.

  1. Open Start.
  2. Search for PowerShell, right-click on the top result, and select the Run as administrator option.
  3. To find out dystrophy, type the following command and press Enter :Get-AppxPackage *PARTIAL-DISTRO-NAME*Here’s an example of searching for a software package that includes ‘ubuntu’ in the name:Get-AppxPackage *ubuntu*Fear From The Ashes
  4. Windows CentralIn the command, replace ‘ubuntu’ with the name of the distro you are looking for.
  5. To remove the version of Linux installed on your computer, type the following command and press Enter :Get-AppxPackag FULL-DISTRO-NAME | Remove-AppxPackageThis example removes the Ubuntu package from Windows 10:Get-AppxPackage CanonicalGroupLimited.Ubuntu16.04onWindows | Remove-AppxPackageUninstall Ubuntu Linux from WSL using PowerShellSource: Windows CentralIn the command, replace ‘CanonicalGroupLimited.Ubuntu16.04onWindows’ with the name of the distro you want to remove.

After completing the steps, you can disable the Linux functionality of the Windows subsystem on your computer.

Disable the Windows Subsystem for Linux using PowerShell

To disable WSL using PowerShell, do the following:

  1. Open Start.
  2. Search for PowerShell, right-click on the top result, and select the Run as administrator option.
  3. To enable the Linux subsystem, type the following command and press Enter :Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Source: Windows Central
  4. Type Y and press Enter to confirm and restart your computer.

After completing the steps, the Linux environment will be removed from the computer.

Leave a Reply

Your email address will not be published.