[FEATURE REQUEST] Chocolatey to Winget migration wizard
Before submitting the issue
- [x] I have checked that the requested feature is not a duplicate or, if it is, it needs to be reopened
- [x] I have checked that I am running the latest version of WingetUI
- [x] I have checked the FAQ section
- [x] I have read the contributing guidelines and I agree with the Code of Conduct
Is your feature request related to a problem? Please describe.
I would like to migrate from choco to winget for packages that are available in winget. WingetUI supports both so it could help with that.
Describe the solution you'd like
Each choco package should have context menu "Migrate to Winget" that will lookup similarly sounding packages in winget (with option to search manually) and offer a choice then unregister it from choco (choco uninstall -n --skipautouninstaller) and reinstall with winpkg.
Additionally there should be a wizard for doing that to all installed packages at once. It could show a table of choco packages, with selection check box and a mapping column that's a dropdown for choice of similar winget packages
Actually I don't think there is a need to reinstall in winget since winget can pick them up automatically.
Yes, I see what you mean
I have done that before (migrating pkgs from Chocolatey to Winget). Since Winget automatically detects installed software as packages, you just need to remove the Chocolatey entry for that package (without actually uninstalling said program):
choco uninstall ExamplePackage -n --skipautouninstaller
Source:
A package with a failing uninstall can be removed with the -n --skipautouninstaller flags. This will remove the package from chocolatey without attempting to uninstall the program.
https://docs.chocolatey.org/en-us/choco/commands/uninstall
I thought a little bit about this issue and IMO a Winget migration wizard would be unnecessary if https://github.com/marticliment/WingetUI/issues/584 were implemented and if there was a context menu option to remove Chocolatey packages without installing them (see comment above). Therefore, after filtering only Chocolatey/Winget packages, you would be able to simply sort by name and remove the unneeded Chocolatey packages.
FWIW not related to WingetUI, but since I had the same request, I made a PowerShell script that does just this kind of migration, with interactive prompts per package: choco2winget.ps1. Might be helpful to others as well.
Note that it only works for packages winget can already detect as installed; I'm not searching for online packages.