Skip to content

Add ability to specify --scope to winget upgrade #2145

@o-l-a-v

Description

@o-l-a-v

Description of the new feature / enhancement

Add a switch for scope/context with winget upgrade, both for listing upgrades (specifying no apps), and when upgrading a specific app.

Example use case

List upgradeable apps
  • A user without admin permissions wants to check what apps can be upgraded, thus listing system context apps makes no sense.
    • winget upgrade --scope user
  • Running winget in system context, thus upgrading user context apps makes no sense.
    • winget upgrade --scope machine
Upgrade app
  • Teams is installed with the system wide MSI installer, but user without admin permissions wants to upgrade Teams in user context.

    • winget upgrade --exact --id Microsoft.Teams --scope user
  • A user without admin permissions wants to upgrade all user context apps.

    • winget upgrade --all --scope user

Proposed technical implementation details

Detection rules should say something about scope/context. So should the manifest too.

Edit 221221

  • Changed from --context to --scope for consistency with winget install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-UpgradeIssue related to WinGet UpgradeIssue-FeatureThis is a feature request for the Windows Package Manager client.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions