Skip to content

Fix 1057: IPM cleanly uninstalls itself now#1106

Open
isc-dchui wants to merge 5 commits intomainfrom
fix-1057
Open

Fix 1057: IPM cleanly uninstalls itself now#1106
isc-dchui wants to merge 5 commits intomainfrom
fix-1057

Conversation

@isc-dchui
Copy link
Collaborator

@isc-dchui isc-dchui commented Mar 18, 2026

Description

Fixes #1057

  • IPM will cleanly uninstall itself (no errors and exits the zpm shell)
  • If any modules are left over, it will ask the user if they want to remove all modules and globals (so IPM can be downgraded)
    • If yes, then uninstalls all modules and kills all globals except history and user settings
    • If no, then just uninstalls IPM (and a reinstall will unorphan the modules)
    • User prompt can be skipped with -force

Example:

zpm:USER>uninstall zpm

The following modules are currently installed:
  - vscode-per-namespace-settings (1.0.0)
  - testcoverage (4.1.2)

Do you want to fully remove all modules and IPM metadata (except history log)?
This is required for downgrading IPM. [y/N]:
[USER|ZPM]      Clean START
[USER|ZPM]      Unconfigure START
[USER|ZPM]      Unconfigure SUCCESS
Warning: 2 module(s) orphaned:
  - vscode-per-namespace-settings (1.0.0)
  - testcoverage (4.1.2)
Reinstalling IPM will automatically re-adopt these modules.
[USER|ZPM]      Clean SUCCESS

IPM has been uninstalled from this namespace. Exiting shell...

Testing

Tested locally with and without other modules present and with and without fully removing IPM metadata. Did not create integration tests because I can't figure out a way of uninstalling/reinstalling IPM without fully breaking it in the middle of tests.

Checklist

  • This branch has the latest changes from the main branch rebased or merged.
  • Changelog entry added.
  • Unit (zpm test -only) and integration tests (zpm verify -only) pass.
  • Style matches the style guide in the contributing guide.
  • Documentation has been/will be updated
    • Source controlled docs, e.g. README.md, should be included in this PR and Wiki changes should be made after this PR is merged (add an extra issue for this if needed)
  • Pull request correctly renders in the "Preview" tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPM Globals Left Behind After Uninstalling

1 participant