intersystems / intersystems/ipm

Support -clean flag to remove Source Directory during Uninstall

Open
#1,033 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
ObjectScript
Stars
41
Forks
29
Avg merge
23h 54m
Merged PRs (30d)
4

Description

### 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).

```objectscript
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.