Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall leaves WSL distros behind #1504

Open
Tracked by #3104
giggio opened this issue Feb 4, 2022 · 12 comments
Open
Tracked by #3104

Uninstall leaves WSL distros behind #1504

giggio opened this issue Feb 4, 2022 · 12 comments
Labels
area/installer For the installer, updater and uninstaller. kind/bug Something isn't working platform/windows
Projects

Comments

@giggio
Copy link

giggio commented Feb 4, 2022

Rancher Desktop Version

1.0.1

Rancher Desktop K8s Version

1.23.3

Which container runtime are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Microsoft Windows [Version 10.0.22000.469]

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

No.

Actual Behavior

Uninstalling leaves the rancher-desktop and rancher-desktop-data behind.

Steps to Reproduce

  1. Install Rancher Desktop
  2. Uninstall Rancher Desktop

Result

After uninstall:

$ wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
rancher-desktop-data
rancher-desktop

Expected Behavior

These distros are removed from WSL.
I might want to keep them, so you should ask. For problems during upgrade (or any other app problem) it would be a nuisance if an uninstall/reinstall deleted all my data.

Additional Information

The work around would be to run:

wsl --unregister rancher-desktop-data
wsl --unregister rancher-desktop
@giggio giggio added the kind/bug Something isn't working label Feb 4, 2022
@github-actions github-actions bot added this to To do in Stripey via automation Feb 4, 2022
@ericpromislow
Copy link
Contributor

Many Windows programs don't remove their data components during uninstall, with the expectation that you'll soon reinstall them and you'll want to have your old data still available. In fact, I don't think I've ever run an uninstaller that asked me if I wanted to keep or delete the data.

So what I'm saying is that not deleting the distros is expected behaviour on Windows. And most people using WSL know how to clear up unneeded distros.

Please feel free to reopen this issue if we should have a second look at it.

@ericpromislow
Copy link
Contributor

We're going to revisit this because the amount of data is so large, and largely not directly controlled by users.

@ericpromislow ericpromislow reopened this Feb 4, 2022
@jandubois
Copy link
Member

Let's include the data volume in this issue as well, so we can close #1505.

@rocketmonkeys
Copy link

Yes, please remove data/wsl-distros when uninstalling rancher desktop. I get that programs sometimes leave some config left behind, but I'd much rather have rancher remove what it installed. It's hard to install rancher, uninstall rancher, and have GB's left behind that require special commands (wsl etc) that the user is unaware of.

@jandubois jandubois added platform/windows area/installer For the installer, updater and uninstaller. labels Jun 16, 2022
@blackthornedk
Copy link

This issue sent me down a long path of trouble. I initially installed Rancher Desktop, but could not get my project working, because it is using docker-compose, and my Rancher Desktop used containerd engine.
I later uninstalled, and installed Docker Desktop, to get the issues in the project fixed.
Today I revisited Rancher Desktop, and got stuck on multiple occasions, with non-descriptive errors from the WSL import command, due to the vhdx files being left in place.

I managed to finally delete them enough times, to get my project working, using the docker engine in Rancher Desktop, but this trial and error process could have been greatly recuced.
It appeared that the images were also in the way, when I tried switching from containerd to docker enging.

@bdutta
Copy link

bdutta commented Dec 6, 2022

New to WSL and Rancher Desktop, but I think Rancher Desktop leaves the WSL namespace with the network interfaces it created. At least this is what I see on my system. If so, this too should also be cleaned up.

@ericpromislow
Copy link
Contributor

Before uninstallling Rancher Desktop, you could run rdctl factory-reset to remove the distros. Once the app is uninstalled rdctl.exe will be deleted from the default installation location.

But the network interfaces is a different issue. @bdutta please feel free to log this in new issue so it doesn't get lost in the details.

@ChristopherHaws
Copy link

ChristopherHaws commented Feb 2, 2023

I gave rancher a try but realized right away that I misunderstood what rancher's use was for and so I uninstalled it. After uninstalling it I realized right away that it completely broke my Docker Desktop/WSL2/Ubuntu installation. After hours of trying things I finally gave up and uninstalled docker desktop and unregistered all my WSL instances and deleted anything docker or rancher related from my temp directories, AppData directories, and ~/.docker directories on my computer to resolve the issue. It's pretty frustrating to users when uninstalling software doesn't leave your system in a usable state and leaves a bunch of data behind. =/

@fasavard
Copy link

fasavard commented Feb 6, 2023

The same thing happened to me. I can confirm that @ChristopherHaws solution solves the problem

@ahmadordi
Copy link

I have the same problem and it destroyed my docker desktop and I lost all my images and containers and volumes :-(. And can not remove rancher-desktop distros and now my docker desktop does not also work.

@devoncrane
Copy link

thank you!

@RNWTenor
Copy link

RNWTenor commented Jan 20, 2024

The same thing happened to me. I can confirm that @ChristopherHaws solution solves the problem

I found that running the command in PowerShell as administrator on windows 11 successfully uninstalled both rancher and rancher-data: >wsl --unregister rancher-desktop rancher-desktop-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/installer For the installer, updater and uninstaller. kind/bug Something isn't working platform/windows
Projects
No open projects
Stripey
To do
Development

No branches or pull requests