microsoft / microsoft/winget-cli

Denied packages should be hidden from `winget upgrade` list

Open
#4,299 4 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Upgrade Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

Packages that have UpgradeBehavior: deny set should be hidden from winget upgrade / winget list --upgrade-available list. We can have an argument --include-denied to show these packages. The current output for pinned, unknown and explicit targeted packages can be extended to show number of denied packages.

Current sample output

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name                         Id              Version      Available            Source
-------------------------------------------------------------------------------------
Discord                      Discord.Discord 1.0.9016     1.0.9035             winget
Microsoft Teams              Microsoft.Teams 1.6.00.29964 23320.3027.2591.1505 winget
Teams Machine-Wide Installer Microsoft.Teams 1.5.0.8070   23320.3027.2591.1505 winget
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
21 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

New sample output line

1 package(s) do not support upgrades through winget. Use --include-denied to see more results.
Proposed technical implementation details

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the winget upgrade and winget list --upgrade-available command paths and how UpgradeBehavior: deny is represented. Check the existing handling for pinned, unknown, and explicitly targeted packages, then identify the argument and output tests covering these commands. Done means denied packages are excluded by default, --include-denied reveals them, and the summary reports their count.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.