Skip to content

Support -clean flag to remove Source Directory during Uninstall #1033

Description

@AshokThangavel

Overview

While IPM manages the filesystem during installation (deleting/recreating directories on install, reinstall, and update), the uninstall command currently leaves the source files on the disk. This results in "Orphaned Folders" that consume space.

Proposed Feature

Add a -clean flag to the uninstall command to synchronize physical and logical removal.

Implementation Details

  • Flag: -clean (Short form: -c)
  • Behavior: Deletes the module’s physical directory tree after the logical uninstall from IRIS is complete.
  • Differentiator:
  • -purge: Wipes database Data (SQL/Globals).
  • -clean: Wipes the Filesystem (Source code/Assets).
ZPM:USER> uninstall testify -clean

Key Benefits

  1. Disk Hygiene: Prevents the accumulation of orphaned folders for uninstalled modules.
  2. Audit Accuracy: Ensures the physical ipm/ directory matches the %IPM.Storage.Module registry.

Additionally add a global configuration setting called CleanOnUninstall. This allows users to define a default filesystem policy for the entire environment.

Configuration Command:

  • zpm:USER> config set CleanOnUninstall 1 (Enable automatic cleanup)
  • zpm:USER> config set CleanOnUninstall 0 (Manual cleanup only; Default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions