Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor uninstall commands #46

Closed

Conversation

TinaMor
Copy link
Contributor

@TinaMor TinaMor commented Jan 30, 2025

PR description

Refactor the uninstall commands to only remove program data (program data folder, config files, env variable, and RegKeys) when the -purge flag is passed.

Github issue

Uninstall-Containerd too destructive #40

Background information

Running the uninstall command currently deletes the program data as well. This is too destructive as the user would like to retain these folders/files (e.g. Containerd snapshot folder) even after installing another version (either an upgrade or an upgrade).

To resolve this, we add a -purge flag that when passed in the uninstall command, the program data will be removed, otherwise, it will be retained.

Testing information

Examples: To uninstall containerd

  1. WhatIf

    > Uninstall-Containerd -WhatIf
    
    What if: Performing the operation "Containerd will be uninstalled from 'C:\Program Files\Containerd'' and containerd service     will be stopped and unregistered" on target "COMPUTERNAME".
  2. Retain the program data

    Uninstall-Containerd
  3. Purge program data

    Uninstall-Containerd -Purge

Checklist

As part of our commitment to engineering excellence, before submitting this PR, please make sure:

  • You've tested this code in both Desktop & Server environments and AMD & ARM64 enviroments (functional testing).
  • You've added unit tests for new code.
  • You've added/updated documentation in the cmdlet docs, command-reference.md and the modules help files.
  • You've reviewed the PR/code best practices defined in the CONTRIBUTING.md.

In addition, after this PR has been reviewed, please agree to:

  • If changes have been made to your PR in the process of addressing comments, please make sure to test again the final version in both AMD and ARM64 environments.
  • Validate your changes have not introduced any regressions.

@TinaMor TinaMor closed this Jan 30, 2025
@TinaMor TinaMor deleted the tinmor/refactor-uninstall branch January 30, 2025 15:01
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.

1 participant