banner



How to completely remove a Linux distro from WSL

In recent times, installing the Windows Subsystem for Linux (WSL) on Windows x and Windows 11 has become much easier. We're at the bespeak now where you can either install it from the Microsoft Store or enter a unmarried command in the terminal to be on your merry way.

One of the many benefits of WSL is that you can set up a full Linux distro and integrate information technology into your Windows workflow without fright of breaking anything important on your PC. Information technology's a virtual machine, just 1 that interacts with your Windows installation, and if anything should become wrong yous can just destroy it and showtime again.

But how do you actually remove a Linux distro installed in WSL? On the face up of things, you might recollect yous just have to uninstall the "app" for the particular distro you installed, but that'southward only half of the boxing. Hither'due south how to completely remove information technology.

How to completely remove a Linux distro from WSL

Indeed you can only right-click and uninstall Ubuntu, Debian, or whatever of the other Linux distros you might accept gear up on WSL. Installing them is as easy as downloading from the Microsoft Store, and removing them is as like shooting fish in a barrel as any other Store app. Alternatively, you can practice the aforementioned with winget in the last if yous're a fan of using the Windows Package Manager.

But this doesn't completely remove all traces. Data and the file organisation created will exist left behind, and then for that, you need to instruct WSL to remove information technology in the terminal. So do the uninstalling of the app second, ideally.

Hither'due south what you need to practise.

  1. Open upward PowerShell.
  2. To get the exact name for the distro yous want, enter wsl -l -v.

    WSL Source: Linux

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

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

          wsl --unregister Debian                  

Information technology's instance sensitive, also, and has to be verbal, which is why it'due south a skillful idea to run Step Ii showtime. Ubuntu, for instance, has a number of dissimilar versions, and yous may well demand to be specific to a version number, such as Ubuntu 20.04. Though this will depend on which parcel yous installed in the first example.

This process should remove any associated file systems, just information technology's worth opening up File Explorer and having a expect simply to brand sure. WSL file systems are easily accessed from the sidebar, and if anything is left behind you can just manually delete it.

Backing upward and importing to WSL

While WSL can be disposable, it's also a good thought to dorsum up your installations then if you do get rid of one you lot can get back to where you were a piffling easier.

Backing up is a pretty straightforward process that involves exporting to a .tar file. Our guides on exporting and importing Linux installs in WSL will take yous through the process step by step, but the main commands you need are equally follows:

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

The process doesn't take also 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: raynorfrossion86.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