rancher-desktop
rancher-desktop copied to clipboard
Uninstall leaves WSL distros behind
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
- Install Rancher Desktop
- 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
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.
We're going to revisit this because the amount of data is so large, and largely not directly controlled by users.
Let's include the data volume in this issue as well, so we can close #1505.
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.
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.
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.
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.
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. =/
The same thing happened to me. I can confirm that @ChristopherHaws solution solves the problem
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.
thank you!
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