PowerShell / PowerShell/PSResourceGet

Uninstall-Module: add ability to uninstall dependent modules

Open
#87 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Dependencies Area-Uninstall
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

From @dmilov on March 21, 2017 8:1

The use-case is to upgrade multiple modules to their new version. When there is a module with number of dependent modules Install-Module allows installing all dependent modules at once. If I need to upgrade the modules to new version with no willing to have multiple versions of certain module I'd expect to be able to uninstall module with all dependent modules at ones using Uninstall-Module.

Here is an example

Module A with version 1.0
Module B with version 1.0, which is required module in the A module's manifest

This call:
Install-Module -Name A -RequiredVersion 1.0

installs both A and B

When new versions of the above modules are published

Module A with version 2.0
Module B with version 2.0

I'd like to be able to

Uninstall-Module -Name A
Install-Module -Name A -RequiredVersion 2.0

and as a result to have installed only

A version 2.0
B version 2.0

Copied from original issue: PowerShell/PowerShell#3379

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 Uninstall-Module and Install-Module entry points and the dependency information in module manifests. Reproduce the A/B version scenario described in the issue, then determine how dependent modules should be identified and removed. Done means uninstalling A also removes its dependent B when appropriate, so reinstalling A at version 2.0 leaves only A 2.0 and B 2.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.