microsoft / microsoft/winget-cli

Package needs

Open
#2,811 1 comment 1 reaction 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

When working on various projects, the required packages (IDEs, SDKs, etc.) change over time. Uninstalling packages manually takes time as you also need to think about which package is still used and which is not.

Using winget import we can import package lists per project to get our environment set up swiftly. But there is no complementary method to also uninstall all these packages again without destroying the environment for other projects that have package requirements in common.

It would be very helpful to have a means of "letting go" of packages.

For example; Project A needs package 1 and 2. Project B needs package 1 and 3. When Project A ends, package 2 should be trivial to remove as there is no longer a need for it. I would expect that if package 2 was installed manually without a specification for its needs, it to remain installed.

I do not care what the term would be for this mechanism. I can imagine it could be "needs, reasons, environment, or requirements".

Going further, sub-needs could be a nice addition. So that if you only need programming or content packages for ProjectA for instance you can only install what you need, or uninstall what you no longer need but keep the rest. Though, this can also be solved in other ways with just the basic feature.

Proposed technical implementation details

Example commands
winget install -e --id Google.AndroidStudio --need ProjectA
winget install -e --id Google.AndroidStudio --need ProjectB
winget install -e --id Google.AndroidStudio --need ProjectA ProjectB

winget import -i ProjectA.json --need ProjectA

winget need ProjectA list packages needed for ProjectA
winget need ProjectA --drop drop the need for ProjectA. Potentially uninstalling packages that were only needed by ProjectA.
When packages are listed, show where they are needed or whether they were installed without a need.

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

No source files or tests are named. Start by reviewing the proposed install, import, and need command behavior; done means tracking project needs while preserving packages shared by other projects and packages installed without a need.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.