You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
winget upgrade --all shouldn't install the same package more than once #1105
Some packages support "side by side" installation. Executing winget upgrade --all shouldn't attempt to install the same "latest" version of a package more than one time.
Examples:
Cura - The .exe installs separate versions into Add / Remove Programs intentionally
Unity - microsoft/winget-pkgs#16038
When the command is executed, check the list of packages to be upgraded. If the same "PackageIdentifier" is found as a possible upgrade more than one time, only execute the upgrade once.
Reacted by Master-Guy, ijshockeymen, Ectalite, M0UL, Charley Wu, Sri Harsha, Cristian Rodríguez, ❤是纱雾酱哟~, MarcelStranak and Manfred
I had a couple of R updates and had some old versions left on my system, winget didn't detect that 4.1.0 is already installed and "upgraded" these 3 versions 3 times for each run.
Name Id Version Available Source
R for Windows RProject.R 4.0.3 4.1.0 winget
R for Windows RProject.R 4.0.4 4.1.0 winget
R for Windows RProject.R 4.0.5 4.1.0 winget
If I don't remove the old versions every time when I run it winget, it tries to "upgrade" these 3 packages 3 times on each run. To me this is a bug, actually two bugs here:
doesn't detect the highest version (it should bail out if the highest version = current)
tries to upgrade each of the old version, so multiple installation of the same version
I did remove old versions, but some people might have legitimate reasons to keep multiple versions, winget should not try to upgrade anything if there are multiple versions and the highest version = current version.
I'll switch the labels from "Issue-Feature" to "Issue-Bug".
I'll share some of my original thinking about why I created this as a feature. When we designed the upgrade experience we didn't encounter this scenario. The client isn't throwing any exceptions. I perceived it as more of an improvement to the current experience than a bug. The current experience is clearly annoying and a waste of resources, but it is "by design".
One persons feature could always be another persons bug. Thank you both for contributing!
I'll switch the labels from "Issue-Feature" to "Issue-Bug".
I'll share some of my original thinking about why I created this as a feature. When we designed the upgrade experience we didn't encounter this scenario. The client isn't throwing any exceptions. I perceived it as more of an improvement to the current experience than a bug. The current experience is clearly annoying and a waste of resources, but it is "by design".
One persons feature could always be another persons bug. Thank you both for contributing!
What made you think this as a feature in the first place? Just curious to understand the reasoning behind. It's an interesting position to have
I tend to think of "bugs" in terms of unintended behavior a a result of some sort of flawed logic implemented, or an unexpected interaction between dependencies. This would be in terms of "it did what I expected when I wrote it and tested it, but I didn't expect this other behavior it exhibited."
For me, the Ultimaker.Cura package was the first I ran across with intentional "side-by-side" installation for newer versions. I thought it was strange when I had two versions on my machine and saw upgrade try to upgrade both of them. I hadn't realized when I ran upgrade the first time, that the older version persisted. Since then, I've seen other packages like C++ runtimes, and other programming languages.
As I stated in my earlier comment, I perceived this Issue as an improvement in the behavior. The code was doing what it had originally been expected to do. Hence, not a bug. I think it's just a philosophical perspective. That's why I made the comment about one person's feature and another person's bug. Sometimes there is more than one right answer 😊.
I am seeing the latest comment on this thread is from more than 2 months ago, is there any update about this issue? I am seeing the exact behavior, about 6 applications (apparently some kind of version bugged) which get reinstalled again and again when running winget upgrade -h --all. I am running v1.2.3411-preview. I love the tool and works seamless for other applications.
Activity
hash-include commentedon Jun 17, 2021
Should this be of type: Issue-bug?
Re-installing same package again and again is confusing and waste of resources.
AdrianTM commentedon Jun 17, 2021
I had a couple of R updates and had some old versions left on my system, winget didn't detect that 4.1.0 is already installed and "upgraded" these 3 versions 3 times for each run.
Name Id Version Available Source
R for Windows RProject.R 4.0.3 4.1.0 winget
R for Windows RProject.R 4.0.4 4.1.0 winget
R for Windows RProject.R 4.0.5 4.1.0 winget
If I don't remove the old versions every time when I run it winget, it tries to "upgrade" these 3 packages 3 times on each run. To me this is a bug, actually two bugs here:
I did remove old versions, but some people might have legitimate reasons to keep multiple versions, winget should not try to upgrade anything if there are multiple versions and the highest version = current version.
denelon commentedon Jun 17, 2021
I'll switch the labels from "Issue-Feature" to "Issue-Bug".
I'll share some of my original thinking about why I created this as a feature. When we designed the upgrade experience we didn't encounter this scenario. The client isn't throwing any exceptions. I perceived it as more of an improvement to the current experience than a bug. The current experience is clearly annoying and a waste of resources, but it is "by design".
One persons feature could always be another persons bug. Thank you both for contributing!
hash-include commentedon Nov 12, 2021
What made you think this as a feature in the first place? Just curious to understand the reasoning behind. It's an interesting position to have
denelon commentedon Nov 12, 2021
I tend to think of "bugs" in terms of unintended behavior a a result of some sort of flawed logic implemented, or an unexpected interaction between dependencies. This would be in terms of "it did what I expected when I wrote it and tested it, but I didn't expect this other behavior it exhibited."
For me, the Ultimaker.Cura package was the first I ran across with intentional "side-by-side" installation for newer versions. I thought it was strange when I had two versions on my machine and saw upgrade try to upgrade both of them. I hadn't realized when I ran upgrade the first time, that the older version persisted. Since then, I've seen other packages like C++ runtimes, and other programming languages.
As I stated in my earlier comment, I perceived this Issue as an improvement in the behavior. The code was doing what it had originally been expected to do. Hence, not a bug. I think it's just a philosophical perspective. That's why I made the comment about one person's feature and another person's bug. Sometimes there is more than one right answer 😊.
GitStudying commentedon Jan 30, 2022
I am seeing the latest comment on this thread is from more than 2 months ago, is there any update about this issue? I am seeing the exact behavior, about 6 applications (apparently some kind of version bugged) which get reinstalled again and again when running winget upgrade -h --all. I am running v1.2.3411-preview. I love the tool and works seamless for other applications.
PascalVerbruggen commentedon Oct 11, 2022
Current production version is doing the reverse:
Name Id Version Available Source
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.1.4 17.3.5 winget
R for Windows 3.6.1 RProject.R 3.6.1 4.2.1 winget
...
winget upgrade --id RProject.R
Found R for Windows [RProject.R] Version 4.2.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://cloud.r-project.org/bin/windows/base/old/4.2.1/R-4.2.1-win.exe
██████████████████████████████ 78.7 MB / 78.7 MB
Successfully verified installer hash
Starting package install...
Successfully installed
=> Result: both old and new version are installed, but according to winget nothing is installed.
winget uninstall --id RProject.R --silent
No installed package found matching input criteria.
winget list --id RProject.R
No installed package found matching input criteria.
After manually removing old version ("C:\Program Files\R\R-3.6.1\unins000.exe" /SILENT):
winget list --id RProject.R
Name Id Version Source
R for Windows 4.2.1 RProject.R 4.2.1 winget
AndreasBrostrom commentedon Jun 30, 2023
Unity have a tendency of installing over an over again.