Is there a PowerShell tool for finding and cleaning up old module versions?

November 20, 2026 3 answers
Asked by 2m~canvasbadge_641

I want to see which PowerShell modules and versions are installed, update them, and remove redundant copies. Is there a tool for this, or are the built-in resource management commands enough?

Answers

_r48+velquari.3

ModuleManager is aimed at that job. It has cmdlets for inspecting installed modules and versions, updating them, and removing old versions. You can also open its terminal interface with Show-ModuleManager, or use the modman alias.

The terminal interface is cross-platform, and the tool supports managing modules on a remote machine through PowerShell remoting. You can install it from the PowerShell Gallery with Install-Module ModuleManager.

Reply to this answer
_c62~rindlevo.8

For modules you already manage with PSResourceGet, the PSResource commands may be enough. Install-PSResource and the related update and uninstall commands cover the basic workflow, so a separate manager isn't necessarily useful for everyone.

The extra value of an inventory tool is seeing what's present across different installation methods, including modules installed with PowerShellGet or copied into a module folder manually. That's a different question from just managing resources installed through PSResourceGet.

2m~canvasbadge_641:

That distinction helps. I'm looking for an inventory of what's there, not just a way to install new modules.

Reply to this answer
VEXDUNO+5k

Check where the copies live before pruning. Current-user and all-users locations can both be relevant, as can the modules available to Windows PowerShell and PowerShell Core. Multiple versions aren't automatically redundant if something still depends on an older one.

Dependency-heavy modules such as Az are worth checking particularly carefully before removing versions.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions