How to uninstall wsl

How to uninstall wsl

Completely uninstall the subsystem for Linux on Win10?

I was fooling around a bit with the Linux/Bash subsystem for Win10.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

7 Answers 7

If its still there, you can try unregistering the distro:

First you need to know which distro is installed by using

From the list choose the distro (e.g. Ubuntu) you want to uninstall and type the command

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

In order to disable WSL, one has to go back into

Similar to what Rop suggested, but you can also use Powershell to completely remove the Windows Subsystem for Linux, with the advantage of not having to look for it in Control Panel. Note that you will have to run this as an administrator.

List all the features available, filtering for Linux:

I combined removing Ubuntu-18.04

and with adding and launching Ubuntu-20.04 from the Windows store to successfully get WSL 2.0 running again it stopped working. I was getting

when I launched wsl 2.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Just a few notes for experimenters, but for Windows 10 client o/s, you can use the following:

Or the analogue:

You can use other tooling to the same affect, such as dism.exe (as illustrated here: https://evidencen.com/wsl2/)

I can’t seem to get a clean uninstall of WSL. I had WSl2 installed and was having DNS problems so I wanted to uninstall everything and go back to WSL 1.

I turn off the feature, delete the distros, delete the «WSL update app», make sure HyperVisor and Windows Subsystem for Linux are disabled in «Programs and Features», and reboot.

It looks like it’s uninstalled.

But then when I try to install the minimum WSL again (ie just enabling WSL in Windows Programs and Features, rebooting, and downloading a distro, when I launch the distro I get

«. WLS 2 requires an update to its kernel component..»

Why is it complaining about WSL2? I’m just trying to install WSL1? My guess is that there is some registry bit or something that still makes it look like I’m trying to use WSL 2.

Any ideas on how to get a truly clean uninstall of WSL so I can get back to version 1?

How to uninstall WSL on Windows 11

You can remove WSL from Windows 11, you just need to uninstall the components in order – here’s how.

On Windows 11, it’s possible to uninstall the Windows Subsystem for Linux (WSL), but it requires multiple steps that you must follow in order. Although Microsoft has streamlined the installation of WSL2 with a single command or using the Microsoft Store, removing the platform is not as simple as clicking the “Uninstall” button from the “Apps & features” settings page.

If you want to completely uninstall WSL from your computer, you want to make sure to first remove the Linux distros, followed by uninstalling additional components and then disable the platform.

Although the ability to run Linux on Windows 11 is a useful feature for developers and users who need access to both platforms, it might come the time when you no longer need the platform or may need to reset it to fix problems.

Whatever the reason, you can permanently remove WSL2 by uninstalling all the components in order.

In this guide, you will learn the steps to remove the Windows Subsystem for Linux platform on Windows 11.

Uninstall WSL on Windows 11

To uninstall the Windows Subsystem for Linux from Windows 11, you first want to remove the distros, kernel update, and then the remaining components.

Remove Linux distros

To uninstall a distro of Linux from WSL, use these steps:

Open Settings on Windows 11.

Click on Apps.

Click the Apps & features page on the right side.

Select the Linux distribution and click the Uninstall button.

Click the Uninstall button again.

Once you complete the steps, repeat the steps to remove any remaining distro as necessary.

Remove Windows Subsystem for Linux components

To uninstall the WSL Linux kernel update and GUI components on Windows 11, use these steps:

Open Settings.

Click on Apps.

Click the Apps & features page on the right side.

Select the Windows Subsystem for Linux WSLg Preview item.

Click the menu (three-dotted) button on the right and click the Uninstall button.

Click the Uninstall button again.

Select the “Windows Subsystem for Linux Update” item.

Click the menu (three-dotted) button on the right and click the Uninstall button.

Click the Uninstall button again.

After you complete the steps, you can uninstall the platform from Windows 11.

Remove WSL from Windows 11

To uninstall the Windows Subsystem for Linux components from Windows 11, use these steps:

Open Settings.

Click on Apps.

Click the Optional features page on the right side.

Under the “Related settings” section, click the More Windows features option.

Clear the Virtual Machine Platform option.

Clear the “Windows Subsystem for Linux” option.

Click the OK button.

Click the Restart now button.

Once you complete the steps, the Windows Subsystem for Linux will be completely removed from Windows 11.

If you change your mind, you can always set up the environment again with these instructions.

We may earn commission for purchases using our links to help keep offering the free content. Privacy policy info.

All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.

How to uninstall WSL2 on Windows 10

If WSL2 isn’t working correctly or not for you, it’s possible to uninstall it completely from Windows 10 – here’s how.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

On Windows 10, you can uninstall the Windows Subsystem for Linux 2 (WSL2) when you no longer need to use the platform, and in this guide, you will learn how to complete the task. WSL2 is the second version of Microsoft’s integration to run Linux on Windows 10 using a lightweight virtual machine instead of a direct translation between Linux and Windows available with the first version.

As a result of this change, you now get an actual Linux kernel with a solution that improves performance and app compatibility while maintaining the same experience as the original version of WSL. (See also the video tutorial to complete this task on the Pureinfotech YouTube channel.)

Although the ability to run Linux on Windows 10 is a useful feature for developers and users who need access to both operating systems, it might come the time when you no longer need the platform, or you may need to reset it to fix problems.

Whatever the reason, you can permanently remove WSL2 by uninstalling all the components, or you can reset distros individually if they are causing issues.

This guide will teach you the steps to completely remove the WSL2 integration on Windows 10.

Uninstall WSL2 on Windows 10

The uninstall process of the Windows Subsystem for Linux 2 requires multiple steps, including removing the distro, kernel update, and other components.

Step one: Uninstall Linux distros from WSL2

To uninstall a distro of Linux, use these steps:

Open Settings on Windows 10.

Click on Apps.

Click on Apps & features.

Select the distribution of Linux and click the Uninstall button.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Click the Uninstall button again.

Once you complete the steps, you may need to repeat the steps to continue removing additional distros as required.

Step two: Uninstall Windows Subsystem for Linux update

To uninstall the WSL 2 Linux kernel update, use these steps:

Open Settings.

Click on Apps.

Click on Apps & features.

Select the Windows Subsystem for Linux update item and click the Uninstall button.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Click the Uninstall button again.

After you complete the steps, you can remove the remaining components.

Step three: Uninstall WSL2 components

To disable the Windows Subsystem for Linux components, use these steps:

Open Settings.

Click on Apps.

Click on Apps & features.

Under the “Related settings” section, click the Programs and Features option from the right side.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Click the “Turn Windows features on or off” option.

Clear the “Virtual Machine Platform” option.

Clear the “Windows Subsystem for Linux” option.

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Click the OK button.

Click the Restart now button.

Once you complete the steps, your computer’s Windows Subsystem for Linux will be completely uninstalled.

If you change your mind, you can always set up the environment again with these instructions. If you run Windows 10 build 20246 and later, you can use the new method to set up WSL2.

We may earn commission for purchases using our links to help keep offering the free content. Privacy policy info.

All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.

remove wsl and start again #2703

Comments

spences10 commented Nov 28, 2017

Is it possible to delete the whole WSL all files therein and start again?

I’d like to be able to start afresh, that means a clean install of Ubuntu and a clean file system, is that possible?

I’ve made a mess installing docker and docker.io and now don’t seem to be able to uninstall docker.io

Related issue here: #2702

I’m wondering if it would be easier for me to start over again rather than spend the amount of time I have spent trying to find a solution that works.

The text was updated successfully, but these errors were encountered:

spences10 commented Nov 28, 2017

Ok cool, and thanks 👍 it’s a question, not a code issue, plus I thought I’d ask the people that would know, so it looks like:

Then I guess there no need to uninstall the Windows app afterwards?

Biswa96 commented Nov 28, 2017 •

@spences10 that’s an old article. The new fall creators update add new executable file wslconfig.exe. Run command wslconfig.exe /u Ubuntu to remove Ubuntu (replace Ubuntu with other distro name). Then reinstall it in normal way if you want to do.

zadjii-msft commented Nov 28, 2017

In the Settings app, under Apps you should be able to find the Ubuntu app

How to uninstall wsl. Смотреть фото How to uninstall wsl. Смотреть картинку How to uninstall wsl. Картинка про How to uninstall wsl. Фото How to uninstall wsl

Just hit uninstall there and reinstall it from the store, that should wipe all of the distro files so you can start clean.

spences10 commented Nov 28, 2017

Are these both valid options for the fall creators update?

Biswa96 commented Nov 28, 2017

Ya both valid for Fall CU. wslconfig is like general process and valid for any distro you install. But settings app shows the distro installed from Windows store only.

spences10 commented Nov 28, 2017

Ok great, thanks, I’ll close this issue now.

LarsWH commented Feb 20, 2018

TelFiREgames commented May 6, 2018 •

Can everyone just shut up with the «why didn’t you google it?» You’re literally cluttering up the entire Internet. I DID GOOGLE IT, THAT’S HOW I GOT HERE. By being obnoxious and unhelpful to this one person who didn’t do their due diligence, you are also being rude and obnoxious and unhelpful to ALL THE PEOPLE WHO DID and got here afterwards.

Jikodis commented Sep 5, 2018

@LarsWH When running lxrun /uninstall I get Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution. I assume the other mentioned solutions in this thread are the prefered way now to uninstall WSL: wslconfig.exe /u Ubuntu etc. or the App section of Windows Settings app.

LarsWH commented Sep 5, 2018

@Jikodis I wouldn’t know. But I would not have posted my reply 20 February if any of the 2017 answers had worked for me (so thanks for the thumbs down. )

mascondante commented Oct 1, 2018 •

I try uninstalling via wslconfig and upon new install I get the same issue:

mascondante commented Oct 2, 2018

Figured out my issue. My AV was blocking perl. https://imgur.com/h1HGZtf

Neue-Ziel commented Jan 2, 2019

@LarsWH When running lxrun /uninstall I get Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution. I assume the other mentioned solutions in this thread are the prefered way now to uninstall WSL: wslconfig.exe /u Ubuntu etc. or the App section of Windows Settings app.

Thanks a lot, this solved my prob. I installed WSL under Windows Server 2019 which means not through Windows Store (because there is no store for server). After the installation, I moved the installation folder, and then I realized the folder also contains the path and the root folder of the subsystem, so I moved everything back, then I got errors all the time.

Google or bing gets the result of lxrun anywhere else which is deprecated in Server 2019. wslconfig.exe solve the uninstall issue and now I am okay to reinstall in the desired folder location. Thanks.

probers1 commented Jan 23, 2019

Just thought I would post my experience. I had to use wslconfgi.exe /l to see the list of distributions installed. my old Ubuntu install was labelled ‘Legacy’ instead of Ubuntu.

djnorrisdev commented Sep 1, 2019

Came back to windows after not touching it for a year. Had sudo permission errors, so I ended up uninstalling Ubuntu through the Apps menu in settings and reinstalling through the store. Everything works now.

b-hayes commented Nov 18, 2019

I cant reinstall. Was half way through moving Ubuntu from wsl2 to wsl1 when it froze and then it couldn’t be accessed at all. Uninstalled form the app settings and now I am unable to install it again.

wormuth commented Nov 19, 2019

bengalih commented Nov 28, 2019 •

Thanks so much. I found your post on this error code for a totally unrelated app that I couldn’t get reinstalled. Sure enough, I found some entries under Packages which required some force-able removal, and I can now install the app!

tenluap commented Oct 16, 2020

You could reset the app for the app setting.
Simply lets say you installed ubuntu wsl from the windows store
click on start and search for ubuntu
right click >> more >> app setting
reset the app
and that will give a clean version of the distro

Pakistaniboy442 commented Oct 21, 2020

Hello I Have Wanted To Do This But Sometimes Windows Just messes Up SO Just Disable And RE Enable WSL
P.S It Helped Me

tlissak commented Dec 28, 2021

After trying everything steel shows files at \wsl$
so only this worked for me :

Footer

© 2022 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Основные команды для WSL

Установка

Устанавливает WSL и дистрибутив Linux Ubuntu. Подробнее.

Установка определенного дистрибутива Linux

Список доступных дистрибутивов Linux

Список установленных дистрибутивов Linux

Указание версии WSL (1 или 2)

Чтобы указать версию WSL (1 или 2), в которой работает дистрибутив Linux, измените на имя дистрибутива, а — на число 1 или 2. Применяется в WSL 1 и WSL 2.

Указание версии WSL по умолчанию

Указание дистрибутива Linux по умолчанию

Чтобы задать дистрибутив Linux по умолчанию, который команды WSL будут использовать для запуска, измените на имя предпочитаемого дистрибутива Linux.

Изменение каталога на домашний

можно использовать с WSL для запуска в домашнем каталоге пользователя. Чтобы в командной строке WSL вернуться в домашний каталог из другого, можно использовать команду cd

Запуск определенного дистрибутива Linux из PowerShell или CMD

Обновление WSL

Проверка состояния WSL

Отображает общие сведения о конфигурации WSL, такие как тип дистрибутива по умолчанию, дистрибутив по умолчанию и версия ядра.

Команда help

Отображает список параметров и команд, доступных в WSL.

Выполнение от имени определенного пользователя

Чтобы запустить WSL в качестве указанного пользователя, замените именем пользователя, который существует в распределении WSL.

Изменение пользователя по умолчанию для распределения

Измените пользователя по умолчанию для входа распределения. Чтобы стать пользователем по умолчанию, пользователь должен уже существовать в распределении.

Shutdown

Завершение

Чтобы завершить работу определенного дистрибутива или остановить его выполнение, замените именем нужного дистрибутива.

Экспорт дистрибутива в TAR-файл

Экспорт дистрибутива в TAR-файл. Именем файла может быть «-» для стандартного вывода.

Импорт нового дистрибутива

Отмена регистрации или удаление дистрибутива Linux

Хотя распределения Linux можно устанавливать из Microsoft Store, через Store их удалить невозможно.

Чтобы отменить регистрацию и удалить распределение WSL, выполните следующие действия:

Вы также можете удалить приложение дистрибутива Linux на компьютере под управлением Windows так же, как и любое другое приложение из Store. Чтобы переустановить его, найдите это распределение в Microsoft Store и нажмите «Запустить».

Подключение диска или устройства

Позволяет подключить физический диск во всех дистрибутивах WSL 2, изменив на путь к каталогу или файлу, где расположен диск. См. статью Подключение диска Linux в WSL 2. Возможны следующие значения.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *