microsoft / microsoft/winget-cli

Upgrade packages matching regex

Open
#2,014 3 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

As a user, I may have several related applications which I would like to update all at the same time, without installing all available upgrades. I would like to be able to specify a regex pattern to match or notmatch to filter this list of packages

This is something which would be possible with the PowerShell Modules once they are fully released using winget upgrade | ? {$_ -match '[regex-here]'} | winget upgrade $_. The ask here is to include this as a core functionality in the cli outside of the PowerShell modules for use in all environments

Proposed technical implementation details

winget upgrade --match 'git' would upgrade all packages where the Package Identifier or Name matches the regex 'git'
winget upgrade --notmatch 'beta' would upgrade all packages where the Package Identifier or Name does not match beta

The matching should be the same implementation used for -match and -notmatch in PowerShell core

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 at the CLI's upgrade command entry point and compare the requested matching behavior with PowerShell's -match and -notmatch semantics. Done means winget upgrade supports --match and --notmatch in all environments, filtering by package identifier or name as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.