Windows Subsystem for Linux – how to uninstall

To uninstall the Windows Subsystem for Linux and all the related files, follow the steps below.

  • Start the command prompt.
  • run the command below.

lxrun /uninstall /full

2018-02-18 08_34_48-Edit Post ‹ Pravin's Blog —

Once done, check on the command prompt. You can still execute the bash on the windows command prompt!

  • To uninstall bash and all related files/commands, go to the Windows settings and Turn Off the Windows Subsystem for Linux feature.
  • Reboot your machine.



The Windows Subsystem for Linux has an install or uninstall operation pending

When uninstalling WSL, you might get something like shown below.

C:\Users\Pravin>lxrun /uninstall /full
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Windows Store:

This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications, new applications, and user data.
Type “y” to continue: y
The Windows Subsystem for Linux has an install or uninstall operation pending.


Here’s how I fixed it.

  • Run the command below to reinstall WSL.

lxrun /install

2018-02-18 08_41_50-Edit Post ‹ Pravin's Blog —

  • Once the install is complete, you can uninstall using the next command.

lxrun /uninstall /full


Windows Subsystem for Linux – install Ubuntu with xfce

Here are the steps to install Ubuntu on Windows 10 using Windows Subsystem for Linux (WSL).

  • On Windows 10, go to Settings.
  • Type insider and press enter.
  • Activate the developer mode.

2018-02-09 22_22_22-Settings

  • Still the Settings panel, type Windows Features. From the drop down, select Turn Windows Features on or off.

2018-02-09 22_29_42-Windows Features

  • Click on the Windows Start menu icon and type bash. Press Enter.

2018-02-09 22_31_46-C__Windows_System32_bash.exe

Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:
Press any key to continue…

2018-02-09 22_37_30-Microsoft Store

  • Click on Ubuntu.

2018-02-09 22_38_59-Microsoft Store

  • Click on Get.

This slideshow requires JavaScript.

  • Once installed, click on Launch.
  • Type a username and password.

This slideshow requires JavaScript.

  • Once you get to the terminal prompt, type the following commands.

sudo apt-get update
sudo apt-get upgrade

Now, the terminal bash can be run on Windows.

2018-02-10 09_47_40-pravin@DESKTOP-S7EGKR1_ _mnt_c_Windows_System32

Now to install xfce, follow the following steps.

  • On the bash terminal type the command below.

sudo apt install xfce4

  • In case there are errors, rerun the same command to continue the installation.


  • Edit the .bashrc file as follows.

nano .bashrc

  • Append the line below.

export DISPLAY=:0.0

  • Once done, go to the website
  • Download the installer, the latest at this time is vcxsrv-
  • Double-click and install the program.
  • Start XLaunch from the Windows desktop shortcut.

2018-02-09 23_35_14-Display settings

  • Choose “One large window” option.

2018-02-09 23_36_44-Client startup

  • Leave the default options and choose Disable access control.

2018-02-09 23_36_56-Extra settings

  • Click on Next and finish.

2018-02-09 23_37_42-Finish configuration

A black window will appear. Do not close it. This is the application window in which Ubuntu will run.

  • Go back to the bash terminal and type the next command.



2018-02-10 10_09_00-pravin@DESKTOP-S7EGKR1_ _mnt_c_Windows_System32

The XLaunch window will show the Ubuntu with the xfce Display Manager.

2018-02-10 10_09_21-VcXsrv Server - Display DESKTOP-S7EGKR1_0.0


Note: I got some errors. So, I installed the xubuntu desktop with the command below.

sudo apt-get install xubuntu-desktop -y

The application menu bar does not start.

Open the bash terminal inside ubuntu and type the command below.

xfce4-panel &

2018-02-10 10_17_30-VcXsrv Server - Display DESKTOP-S7EGKR1_0.0

Close the bash terminal.

Now you can use the Applications menu without any problems.

2018-02-10 10_23_30-Mail