PowerShell / PowerShell/PSResourceGet

Cleanup functionality, where only the latest version of a module is kept

Open
#581 10 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary of the new feature / enhancement

As a user/administrator I want to only keep the latest version of any module, so I don't accumulate many outdated versions on the systems that I manage.

Proposed technical implementation details (optional)

Functional implementation ideas

  1. Update-PsResource -KeepLatestOnly
  2. Uninstall-PsResource -KeepLatest

Technical idea
The GetHelper class could be used and expanded to implement a filter returning all modules except the latest version. With that, the proper uninstalls could be performed (option 2) after installing the newest version (option 1).

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 reviewing the GetHelper class and the Update-PsResource and Uninstall-PsResource entry points. Determine how a filter can identify all installed module versions except the latest, then verify that the selected cleanup behavior works for both proposed command options.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
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.