How will Hexnode handle APK uninstallation and re-installation if the device is offline during policy changes?Solved

Participant
Discussion
4 weeks ago Feb 02, 2026

Hi team, I have a scenario I need to confirm. I have a device (Device A) currently associated with a policy containing an APK. I want to switch this to a new policy with a new APK.

If Device A is offline and I perform the following:

  1. Disassociate the existing policy.
  2. Associate the new policy.

Is my understanding correct that once the device comes back online, Hexnode will first uninstall the old APK and then install the new one?

Replies (1)

Marked SolutionPending Review
Hexnode Expert
4 weeks ago Feb 03, 2026
Marked SolutionPending Review

Hi @eliiza,
Thank you for reaching out.
Your understanding of the sequence is spot on, provided a specific setting is enabled within the original policy. Here is the breakdown of how Hexnode will handle this once the device transitions from offline to online:

The Critical Requirement: For the automatic uninstallation to occur, the original policy must have the following toggle enabled:

  • Android > App Management > Required App > “Remove apps from the device on policy removal.” 

If this is checked, Hexnode will queue an uninstall command the moment the policy is disassociated.

Execution Flow (When Device comes Online): Once the device reconnects, it processes the pending commands in the order they were received by the server:

  • Uninstall Command: Triggered by the disassociation of the first policy.
  • Install Command: Triggered by the association of the second policy.

Alternative Approaches: If you do not have the “Remove apps from the device on policy removal.” setting enabled, the app will remain on the device. In that case, you have two options:

  • Manual Uninstall: Trigger a remote Uninstall Application action from Hexnode UEM.
  • App Update: If the new APK has the same Package Name as the old one, you don’t need to swap policies. Simply update the APK file in the existing policy, and Hexnode will push it as a version update.

Regards,
Eden Pierce

Save