# How to downgrade apps on your Android devices?

An enterprise app is a dedicated application that is developed to be used within an organization and to facilitate its operations. To distribute the app via Hexnode UEM, it must be first added to the Hexnode app repository.

If the enterprise app you pushed has some security issues or other bug-related errors, it can cause a major IT catastrophe. With Hexnode, you can downgrade enterprise apps and deploy them to Android devices. This can be done by uploading the lower version to the Hexnode app repository.

 Note: For the lower version app to take effect on the device, the app (the higher version) must be pushed as a required app and not using the **Install Application** action.

 

1. Login to your Hexnode UEM portal.
2. Navigate to the **Policies** tab in your portal.
3. Select an existing policy or create a new one by clicking **New Policy**.
4. Go to **Android > App management > Required Apps > Configure > +Add > Add App/App Group >** Select the enterprise app/app group **> Done**.
5. Enable **Enforce app downgrade** to allow installation of a lower version of the app if pushed from Hexnode.
6. **Save** the policy.

Enforcing app downgrade on enterprise app 
------------------------------------------

App downgrade from the Hexnode console is possible only if the app was installed using the *Required Apps* policy. Enabling the option **Enforce app downgrade** on the same policy helps with app downgrading on Android devices.

1. Login to your Hexnode UEM portal.
2. Navigate to the **Policies** tab in your portal.
3. Identify the **Required Apps** policy used to distribute the enterprise app.
4. Select the policy.
5. Go to **Android > App management > Required Apps**.
6. Enable **Enforce app downgrade** to allow installation of a lower version of the app if pushed from Hexnode.
7. Save the policy.

Associate policies with devices / groups
----------------------------------------

If the policy has not yet been saved.

1. Navigate to **Policy Targets**.
2. Click on **+Add Devices**.
3. Select the devices and click **OK**.
4. Click on **Save** to apply the policies to devices.

If the policy has been saved, you can associate it with another method.

1. From **Policies**, check the policies to be associated.
2. Click on **Manage** > **Associate Targets** and select the device.
3. Click on **Associate** to apply the policy to the devices.

Apart from devices, you can also associate the policies with **device groups**, **users**, **user groups**, or **domain** from **Policy Targets**.

Downgrade the app
-----------------

1. Login to your Hexnode UEM portal.
2. Go to the **Apps** tab.
3. Search for the enterprise app you want to downgrade.
4. Click on the app.
5. On the App details box, click on the gear icon.
6. Select **Edit** from the drop-down list.
7. Click on the option **Change** beside the APK File.
8. Upload the older app version.
9. Click **Save**.

You can also add the lower version of the app as a new enterprise app and then push it to the device.

 Notes: 
If you have not enabled the option **Enforce app downgrade**, you cannot downgrade the app. The ***Action History*** tab will display a failed status message for the app installation stating, “Version code and version name of the app needs to be different from the previously installed app version”.

The app will get automatically downgraded on [Samsung Knox](https://www.hexnode.com/mobile-device-management/help/hexnode-mdm-for-samsung-knox-devices/), [LG GATE](https://www.hexnode.com/mobile-device-management/help/hexnode-mdm-for-lg-gate-devices/), [Kyocera business phones](https://www.hexnode.com/mobile-device-management/help/hexnode-mdm-for-kyocera-business-phones/), and rooted Android devices without any user intervention. But the app data will get cleared during the downgrade. But if your Samsung Knox device is running an Android version below 7.0, then the app can be downgraded without clearing the app data.

 

 
[![Info for a failed Install Application action](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2023/06/Error-shows-up-while-executing-the-Install-Application-action.png "Error shows up while executing the Install Application action")](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2023/06/Error-shows-up-while-executing-the-Install-Application-action.png)