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

Exclude packages from Windows Package Manager #2339

Open
denelon opened this issue Jul 14, 2022 · 11 comments
Open

Exclude packages from Windows Package Manager #2339

denelon opened this issue Jul 14, 2022 · 11 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@denelon
Copy link
Contributor

denelon commented Jul 14, 2022

I would like to be able to exclude packages from the Windows Package Manager.

winget exclude <package> would mark a package as excluded.

It should not be upgraded with winget upgrade --all


I'm also seeing this issue with several packages. One solution that I have thought of is for there to be an option to hide packages from winget. i.e. if there is a package that I don't want winget to manage and I will manage manually, add it to some exclusion list.

Originally posted by @dgee2 in #2313 (comment)

edit:

We've also been discussing the exclusion of these packages from winget export packages.json

@ghost ghost added the Needs-Triage Issue need to be triaged label Jul 14, 2022
@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Jul 14, 2022
@denelon
Copy link
Contributor Author

denelon commented Jul 14, 2022

Discussion about this feature:

@Trenly
Copy link
Contributor

Trenly commented Jul 15, 2022

How is this use case different than #476 ?

@RichiCoder1
Copy link

As a guess, is the use case for this possible different from pin as pin is "I want to track this package, but not upgrade it" while exclude would be "I don't want to have winget recognize this package at all". E.g. doesn't show up in winget export and list.

@RottenRonnie
Copy link

RottenRonnie commented Jul 20, 2022

How is this use case different than #476 ?

Pin and unpin needs to be explained and documented.

Exclude is recognized by Microsoft in other apps and has switches such as /XO /XF in use by Robocopy.

winget upgrade --all -h --accept-package-agreements -XF c:\excluded.pakages.txt

or

winget upgrade --all -h --accept-package-agreements -XP:"Microsoft.Teams|1.5.00.14473","VideoLAN.VLC|3.0.17.4"

I think you can see that I want to assemble the command or have the option of placing a package list so winget upgrades everything but the excluded packages.

@denelon
Copy link
Contributor Author

denelon commented Jul 20, 2022

Draft PR in progress:

@vedantmgoyal9
Copy link
Contributor

@Trenly
Copy link
Contributor

Trenly commented Sep 19, 2022

I disagree. #1439 is more around pinning -

It would be very useful to have an "ignore" option where you can specify an installed program to just exclude from the winget upgrade functionality.

@denelon
Copy link
Contributor Author

denelon commented Sep 19, 2022

There have been several concerns around the behavior of winget upgrade --all and winget export.

Pinning is critical functionality in the client, but in some cases winget exclude would be desirable to have winget essentially ignore certain packages in those cases.

Other related features have been dealing with "Unknown" versions and ignoring packages that upgrade themselves with respect to winget upgrade --all. Sometimes it's better to allow those packages to handle their own upgrades, as they may do it more gracefully like preserving settings or other user configured behaviors than if the newer package version was installed. We don't want users to lose settings in cases like that.

@marcinsmialek
Copy link

In addition to that, there should be an interactive way to select the packages to upgrade.

I don't mean running all of them in an interactive way, but something like running winget upgrade --all --interactive-selection.

This would present a list of packages which would be upgraded, so the user can decide if to really upgrade all of them, or pick/skip some (perhaps even mark as pinned or excluded altogether).
This might look like Git interactive stage with nice menus etc., or Git interactive rebase with a text file to edit.

Another benefit of this option would be ensuring that upgrade --all is what we really want. There's a risk of manifest catalog changing in an unexpected way, between checking which packages have updates and executing the upgrade itself.

@whoiskevinrich
Copy link

To add color/context to the ask: I run upgrade --all periodically. Never in the history of my winget use has Ubisoft.Connect, EpicGames.EpicGamesLauncher, or MusicBrainz.Picard ever actually upgraded. At this point, I'd love to be able to add these IDs to a deny-list and never worry about them again to reduce the time for the upgrade command to complete.

@Trenly
Copy link
Contributor

Trenly commented Oct 15, 2023

To add color/context to the ask: I run upgrade --all periodically. Never in the history of my winget use has Ubisoft.Connect, EpicGames.EpicGamesLauncher, or MusicBrainz.Picard ever actually upgraded. At this point, I'd love to be able to add these IDs to a deny-list and never worry about them again to reduce the time for the upgrade command to complete.

This can be done using winget pin <id>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

7 participants