# Automate App Uninstallation on macOS Devices in Hexnode UEM

Executive Summary
-----------------

Standard uninstallation methods often leave behind residual cache files and complex application dependencies. This can lead to storage bloat and potential security vulnerabilities on macOS devices. The App Uninstallation automation in Hexnode UEM resolves these challenges by providing advanced controls over the entire removal process. Administrators can dictate exact removal sequences and execute custom scripts before and after uninstallation. Additionally, the feature enforces silent background removals to ensure complete app removal without requiring end user interaction.

Strategic Use Cases
-------------------

- **Storage Management:** Reclaim device storage by silently removing legacy or unused software packages.
- **Policy Compliance:** Enforce organizational policies by removing unauthorized consumer applications (such as personal cloud storage or messaging platforms).
- **Device Handover:** Ensure comprehensive data sanitization by completely wiping all third-party applications when an employee offboards or a device is reassigned.

 Note: 
Currently, the App Uninstallation automation feature exclusively supports the removal of **Enterprise Apps**.

 

 
Configuration Guide
-------------------

### Step 1: Initialization

1. Navigate to the Automate tab in the Hexnode UEM portal.
2. Click New Automation and select macOS.
3. Provide a descriptive name for the automation.

### Step 2: Action Configuration

Select App Uninstallation and proceed through these four stages:

#### A. Select Applications

Select the target applications for removal and confirm the selection.

![Screenshot of App uninstallation action under Automate tab in Hexnode UEM displaying the window to select apps for removal.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2026/07/Selecting-applications-for-uninstallation-300x162.png)

#### B. Configure Scripts

Toggle and assign scripts from your repository to handle any specific uninstallation requirements for each app.

**Script Type****Function****Example****Pre-Uninstall**Executes before the uninstallation initiates.Terminates active application processes (e.g., using *killall*).**Post-Uninstall**Executes immediately after the application is removed.Deletes lingering preference files (*.plist*) and clears application caches.**Audit-Uninstall**Executes upon completion of the uninstallation workflow to perform final evaluations or custom tasks.Logs custom removal metrics, evaluates the final device state, or scans the directory to confirm complete deletion of the app.![Screenshot of App uninstallation action under Automate tab in Hexnode UEM displaying the window to configure pre-uninstall, post-uninstall, and audit scripts.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2026/07/Configuring-pre-uninstall-post-uninstall-and-audit-scripts-for-app-uninstallation-300x161.png)

#### C. Set Uninstallation Flow

Utilize the drag-and-drop interface to establish the exact sequential order for multi-app removals.

#### D. Configure Mode of Uninstallation

Define the user experience during the uninstallation process:

- **Silent uninstallation:** The application is removed in the background without on-screen prompts.
- **Notified uninstallation:** The user receives an on-screen alert regarding the removal.

![Screenshot of App uninstallation action under Automate tab in Hexnode UEM displaying the window to select the uninstallation type as silent or notified.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2026/07/Configuring-the-app-uninstallation-mode-300x161.png)

### Step 3: Scheduling & Triggers

Define exactly when the automation will run by selecting one of these triggers:

**Trigger Type****Available Options****Time**- Once, ASAP
- Once (Scheduled Time)
- Repeat at a set schedule

**Activity (Enrollment)**- on Device Enrollment
- on Device Re-Enrollment

**Activity (Compliance)**- on Device Compliance / Non-Compliance
- on Location Compliance / Non-Compliance

### Step 4: Target Filters and Finalization

Select the target devices using **Included groups**, **Excluded groups**, or custom **Filters**. Review the configuration and click **Save** to deploy the automation.

Tracking Automation Status
--------------------------

Administrators can monitor the execution status of the app uninstallation workflows in the following ways:

### 1. Device-Level Tracking (Action History)

To view a granular, step-by-step execution log for a specific endpoint:

1. Navigate to **Manage > Devices > [Device Name]** and select the **Action History** tab.
2. This view logs individual stages (such as script executions and application removals) alongside their timestamps and statuses.
3. Click **Show Output** to inspect the exact results of executed scripts.

![Screenshot of device Action History under Manage tab in Hexnode UEM displaying the execution status of the app uninstallation action.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2026/07/Tracking-app-uninstallation-success-via-device-Action-History-300x140.png)

### 2. Automation-Level Tracking (Reports)

To view a consolidated summary of the automation deployment across all targeted devices:

1. Navigate to the **Automate** tab, select the specific automation, and click **Reports**.
2. This dashboard displays the Device Name, Action, Subject (the target application), Status, and Timestamps.
3. Administrators can use the **Filter** button to isolate specific execution states or click **Export** to download the deployment report.

![Screenshot of automation Reports under Automate tab in Hexnode UEM displaying the consolidated deployment status of the app uninstallation action.](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2026/07/Viewing-fleet-wide-automation-deployment-reports-for-app-uninstallation-300x139.png)

Troubleshooting
---------------

**Issue****Probable Cause****Solution****Leftover files remain on the Mac**Standard uninstallation commands only remove the main application bundle, leaving cache files behind.Deploy an **Audit-Uninstall Script** to scan the directory and confirm all residual data is wiped.**Scripts fail to execute**The script contains formatting errors, or the Hexnode agent lacks necessary system permissions.Ensure scripts are formatted as ***.sh*** for macOS and verify the MDM agent has Full Disk Access.**Application fails to uninstall**macOS prevents the deletion of applications that are actively running.Utilize a **Pre-Uninstall script** to force-quit the application (e.g., *killall [App Name]*) prior to removal.