When a primary module is uninstalled without -r, its dependencies are often left behind in the namespace. Currently, IPM/ZPM has no way to distinguish between a module you wanted (Direct Install) and a module you needed (Dependency). Consequently, these leftover dependencies appear as "root" modules in a standard list, creating a cluttered environment where it is impossible to tell which packages are safe to remove and which are still serving a purpose.
Proposed Solution
Introduce an -orphans flag (with the alias -u for unused) to the list command to identify unreferenced, non-primary modules.
- New Flag:
list -orphans (Alias: list -u).
- Detection Criteria: The command identifies modules that meet two conditions:
- Implicitly Installed: The module was originally brought in as a dependency, not via a direct user
install command.
- Unreferenced: No other currently installed module in the namespace lists this package as a dependency.
- Display: The command output will specifically list these "leftover" modules, allowing the user to see exactly what is no longer required by the system.
When a primary module is uninstalled without
-r, its dependencies are often left behind in the namespace. Currently, IPM/ZPM has no way to distinguish between a module you wanted (Direct Install) and a module you needed (Dependency). Consequently, these leftover dependencies appear as "root" modules in a standardlist, creating a cluttered environment where it is impossible to tell which packages are safe to remove and which are still serving a purpose.Proposed Solution
Introduce an
-orphansflag (with the alias-ufor unused) to thelistcommand to identify unreferenced, non-primary modules.list -orphans(Alias:list -u).installcommand.