Use this page when decommissioning AI Watch from a fleet, rolling back a test deployment, or cleaning up legacy script-based installs. If you are only migrating from the old script-based macOS Detect rollout to the package, use Legacy macOS Detect Cleanup.
Removal order
- Set Mode to Monitor and Sessions off from the deployment’s Manage settings dialog while AI Watch is still installed. Also set the MDM-owned legacy
Enforcement=false and AutoUpdate=false fallback values.
- Let AI Watch reconcile to Detect-only mode so it removes Runlayer hook entries and preserves third-party hooks.
- Verify hook configs are absent.
- Remove the package, profiles, and local agent artifacts (the MSI uninstall removes the Windows Scheduled Tasks).
- Restart AI clients so they stop reading any cached hook configuration.
Do not remove the package first if Protect, Enforce, or Sessions installed hooks. The packaged aiwatch binary is what removes Runlayer hook entries safely after Mode is Monitor and Sessions is disabled.
pkgutil --forget is not an uninstaller. It only forgets the macOS installer receipt after files have been removed.
macOS
Phase 1 - Disable hooks
In Settings → MDM configuration → Manage settings, set Mode to Monitor and Sessions off. Then re-push the AI Watch tenant configuration profile with automatic updates disabled and the same Monitor / Sessions fallback values for older or offline clients:
Keep the AI Watch .pkg and tenant configuration profile assigned until hook reconciliation finishes. AutoUpdate=false prevents the hourly updater from racing package removal. The bootstrap LaunchDaemon then runs aiwatch setup hooks install --mdm on its normal schedule and removes Runlayer hook entries.
To force reconciliation immediately, push this one-time script as root:
check should exit 0 once the device is compliant with Detect-only hook state. When only Detect is enabled, stale Runlayer hooks are treated as drift so your MDM can remediate them.
Phase 2 - Remove the package
After hook reconciliation passes, unscope the device from the AI Watch .pkg assignment so the package cannot be reinstalled. Keep the tenant configuration profile with AutoUpdate=false assigned until local cleanup finishes; then unscope all three profiles:
- Tenant configuration profile:
com.runlayer.aiwatch
- PPPC / Full Disk Access profile:
com.runlayer.aiwatch.pppc
- Login Items profile:
com.runlayer.aiwatch.loginitems
While the tenant profile is still assigned, push this one-time package cleanup script as root:
Windows
Phase 1 - Disable hooks
In Settings → MDM configuration → Manage settings, set Mode to Monitor and Sessions off while AI Watch is still installed. Also update the registry fallback and disable automatic updates:
You can push those fallback values with an Intune script, or redeploy the app configuration with AIWATCH_MODE=monitor AIWATCH_ENFORCEMENT=0 AIWATCH_SESSIONS=0 AIWATCH_AUTO_UPDATE=0.
The device-local AIWatchHooks scheduled task runs aiwatch.exe setup hooks install --mdm on its next tick (at-boot + hourly); Monitor with Sessions disabled reconciles to Detect-only and removes Runlayer hook entries while preserving third-party hooks.
To force reconciliation on a device immediately, run as SYSTEM:
check should exit 0 once the device is compliant with Detect-only hook state. Stale Runlayer hook entries cause a non-zero exit until reconciliation removes them.
Phase 2 - Remove the package
In Intune:
- Remove or unassign the AI Watch app.
- Restart AI clients on affected devices.
Use the app uninstall command:
On a true uninstall the MSI’s unregister custom action removes the entire hidden \Runlayer Task Scheduler folder (AIWatchHooks and AIWatchScan, plus any leftover legacy AIWatchScanManager / AIWatchScan-<SID> tasks), then the MSI removes C:\Program Files\Runlayer\AIWatch\ and the managed registry values under HKLM\Software\Runlayer\AIWatch. There are no separate Intune Remediation assignments to clean up.
Legacy script-based installs
For macOS fleets that used the original script-based Detect rollout, follow Legacy macOS Detect Cleanup. That page removes the old runlayer-scan wrapper, per-user LaunchAgent, old PPPC profile, and script logs while preserving unrelated user CLI state.
For custom Windows script or hand-rolled Scheduled Task deployments, remove the MDM script or task assignment, then remove any custom task, script, or log paths your deployment created. The current Windows package registers its own tasks under the \Runlayer Task Scheduler folder, which the MSI uninstall removes — so this section only applies to bespoke deployments you built yourself, not the packaged MSI.
Verification
macOS
Before package cleanup, verify Phase 1 hook reconciliation. This proves AI Watch is in the desired Detect-only hook state; it does not prove the package has been removed.
After package cleanup:
Windows
Before package removal, verify Phase 1 hook reconciliation. This proves AI Watch is in the desired Detect-only hook state; it does not prove the package has been removed.
After package removal: