Uninstall an instance

Use the uninstaller inside the instance you are removing. It reads that installation's manifest to identify its services and other resources. Review the plan before changing the machine.

Windows x64Linux x64macOS arm64: source path

Before removal

  1. Identify the exact instance name and install root. The manifest is <install-root>/Setup/instance-<name>.json. Do not infer ownership from a service name alone.
  2. Back up application data and databases using your normal backup process. Doctor's snapshot records file hashes; it is not a data backup.
  3. Run the installed script with --dry-run (PowerShell: -DryRun) and read every KEPT or warning line, especially on a host with more than one instance.
Keep the manifest until the run finishes. It records what this installation created. If an optional removal step fails, the uninstaller keeps the manifest and files so the same command can be retried.

Choose the scope

ScopeEffect
No removal flagsStops and unregisters this instance's OS services or launchd jobs. Files, web site, privilege rule and service account stay.
--remove-web-site / -RemoveWebSiteRemoves the nginx or IIS site recorded as created by this installation.
--delete-files / -DeleteFilesRemoves owned files. The web-site flag must accompany it, because removing the manifest first could leave an orphaned site.
--all / -AllRequests services, site, files, privilege rule and service account. Shared resources remain guarded when another instance uses them.

On macOS, the privilege-rule flag is --remove-privilege-rule (--remove-polkit-rule is accepted as an alias). Run elevated: sudo on Linux/macOS, Administrator PowerShell on Windows. An unattended destructive run also needs --yes or -Yes.

Linux

Set INSTALL_ROOT to the actual root and replace Main01 with the manifest's instance name. Preview a full removal:

INSTALL_ROOT="/opt/createrun"
sudo bash "$INSTALL_ROOT/Services/Application Service/Scripts/uninstall-instance.sh" \
  --instance Main01 --install-dir "$INSTALL_ROOT" --all --dry-run

After reviewing the plan and your backup, run the same command with --dry-run replaced by --yes. Omit --all to remove service registrations only.

Windows

Run in an Administrator PowerShell window. Preview a full removal:

$instanceRoot = 'C:\Createrun'
& "$instanceRoot\Services\Application Service\Scripts\uninstall-instance.ps1" `
  -Instance Main01 -InstallDir $instanceRoot -All -DryRun

After reviewing the plan and your backup, replace -DryRun with -Yes. Omit -All to remove service registrations only. The Setup Bootstrapper's uninstall sub-command delegates to this installed script when it is present.

macOS (Apple Silicon)

The macOS installer source includes a separate launchd-aware script. If you have a macOS installation, verify that this script exists in its actual root before using it. Its behavior has not yet been accepted on a real Mac.

INSTALL_ROOT="/opt/createrun"
sudo bash "$INSTALL_ROOT/Services/Application Service/Scripts/uninstall-instance-macos.sh" \
  --instance Main01 --install-dir "$INSTALL_ROOT" --all --dry-run

Review the launchd jobs, nginx site (if configured), sudoers rule, account and KEPT lines. Only then replace --dry-run with --yes. A workstation user's own account is outside the script's service-account removal scope.

Read the result

Exit codeWhat to do
0Every requested scope completed. Warnings may describe resources that this installation never created.
1Partial removal. Read the failed scope, correct the cause and rerun the same command; the manifest remains for recovery.
2Usage or instance-resolution error. Correct the arguments; no removal began.
3Administrator/root privileges are required; no removal began.
4Another instance was left unusable. Stop further removal and inspect that instance.
Store registration is separate. Local uninstall does not deregister the instance from the Store. Do not interpret a successful local exit code as proof that its Store record was removed.