banner



How to completely remove a Linux distro from WSL

In contempo times, installing the Windows Subsystem for Linux (WSL) on Windows 10 and Windows eleven has go much easier. We're at the point now where you can either install it from the Microsoft Store or enter a single command in the concluding to be on your merry manner.

One of the many benefits of WSL is that you can fix up a full Linux distro and integrate it into your Windows workflow without fear of breaking annihilation important on your PC. It'southward a virtual car, simply one that interacts with your Windows installation, and if annihilation should go incorrect you lot can simply destroy information technology and start again.

But how do you actually remove a Linux distro installed in WSL? On the face of things, you might remember yous but have to uninstall the "app" for the particular distro you installed, merely that'south only one-half of the battle. Here'south how to completely remove it.

How to completely remove a Linux distro from WSL

Indeed you can simply right-click and uninstall Ubuntu, Debian, or whatsoever of the other Linux distros you might have set on WSL. Installing them is as easy as downloading from the Microsoft Store, and removing them is as easy as any other Shop app. Alternatively, y'all can do the aforementioned with winget in the last if you're a fan of using the Windows Parcel Manager.

But this doesn't completely remove all traces. Data and the file organisation created will exist left behind, so for that, y'all need to instruct WSL to remove it in the concluding. Then do the uninstalling of the app second, ideally.

Here's what you need to do.

  1. Open PowerShell.
  2. To become the exact proper noun for the distro you lot want, enter wsl -50 -v.

    WSL Source: Linux

  3. Enter into the concluding wsl --unregister <distro proper name>.

The unregister option volition tell WSL to completely destroy all traces of the file system and any data contained inside it. So, for example, if you wanted to remove an installation of Debian your command would look like this:

          wsl --unregister Debian                  

It's case sensitive, likewise, and has to exist exact, which is why it's a good idea to run Step Two first. Ubuntu, for instance, has a number of different versions, and yous may well demand to be specific to a version number, such every bit Ubuntu xx.04. Though this will depend on which parcel you lot installed in the first case

Backing up and importing to WSL

While WSL can exist disposable, it'southward too a expert thought to back up your installations so if you do get rid of one you lot can go back to where yous were a little easier.

Backing upwards is a pretty straightforward process that involves exporting to a .tar file. Our guides on exporting and importing Linux installs in WSL will take y'all through the procedure step by step, but the master commands you need are as follows:

          wsl --export <distro> <filename.tar> wsl --import <distro> <install location> <filename>                  

The process doesn't take too long, and it's particularly useful if you plan on making frequent changes to your WSL installs.

Source: https://www.windowscentral.com/how-completely-remove-linux-distro-wsl

Posted by: moandin1942.blogspot.com

0 Response to "How to completely remove a Linux distro from WSL"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel