---
title: Automated Device Cleanup
slug: dmg-android/guide/automated-device-cleanup
createdAt: 2026-10-06T07:46:34.646Z
---

A common task, although not necessarily a daily task, is retiring unused or deleting retired devices. You can retire devices that have not checked in or delete retired devices by a threshold amount of time. Deleting these devices from the database improves Ivanti EPMM performance and frees up disk space.

After saving the settings, to view the logs for the automated device cleanup, use the Filters section on the left side of the Audit Logs page to narrow the search.

:::hint{type="info"}
You can now manually select a device or multiple devices from **Devices & Users** > **Devices** > select the appropriate device > **Actions** > **Delete**. This is an irreversible action and devices once deleted cannot be managed.
:::

**Prerequisites**

Make sure you are assigned the required administrator role. To delete or retire devices, you must be:

- Assigned to the global space
- Assigned the administrator role Delete retired device

:::ExpandableHeading
## Cleaning up devices that have not been checked-in for N days

1. In the Admin Portal, go to Settings > System Settings.
2. <font color="#323232">Select </font>Users & Devices > Automated Device Cleanup. The **Automated Device Cleanup** page opens.
3. Enter the settings as per below:
4. *Table 17. Retiring of devices*

| Field                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Retire /Wipe Devices That have Been Not Checked-In More Than (days) | Days: 30 days is default, 365 days is maximum allowed.                                                                                                                                                                                                                                                                                                                                                 |
| Show not checked-in devices list                                    | Selecting the link opens the Advanced searching page in Devices & Users and poplulates the search with the regular expression for the search. Select Search.                                                                                                                                                                                                                                           |
| Send Wipe to Devices                                                | The admins can wipe an eligible device if it has not checked-in for N number of days. This option is disabled by default.<br />**For Android**: Fully managed (Device Owner), Managed Device with Work Profile (Comp), and Android Open Source Project (AOSP).<br />**For Apple**: iOS, macOS, and AppleTV devices enrolled via Apple Device Enrollment Program.                                       |
| Maximum Devices to Retire/Wipe in Each Session                      | Select 100 (default), 500, or 1000.<br />The cleanup session may have an impact on the overall system performance. Configure the maximum limit for your environment.                                                                                                                                                                                                                                   |
| Automatically Retire/Wipe Devices on a Schedule                     | Selecting this check box expands the Retire/Wipe Schedule Configuration section.<br />- Daily: Select the run time from the At: drop-down menu. The default is midnight.<br />- Weekly: Select the day and time for the clean up. Default value is Sunday at midnight.<br />- Monthly: Select the time for a first-day-of-the-month schedule frequency. Default is first day of the month at midnight. |

5. Select Cleanup.
6. Select Save to save the configuration.


:::

::::ExpandableHeading
## Deleting devices that have been in selected states for N days

1. In the Admin Portal, go to Settings > System Settings.
2. <font color="#323232">Select </font>Users & Devices > Automated Device Cleanup. The Automated Device Cleanup page opens.
3. Enter the settings as per below:

*Table 18. Deleting of devices in selected states*

| Field                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                       |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Select the states to take actions on                              | Select all or just the desired options:<br />- Retired<br />- Retire Pending<br />- Wiped<br />- Wipe Pending<br />- Expired                                                                                                                                                                                                                                                                      |
| Delete devices that have been in selected states more than (days) | Days: 30 days is default, 365 days is maximum allowed.                                                                                                                                                                                                                                                                                                                                            |
| Show devices in selected states                                   | Selecting the link opens the Advanced searching page in Devices & Users and poplulates the search with the regular expression for the search. Select Search.                                                                                                                                                                                                                                      |
| Maximum devices to delete (in selected states) in each session    | Select 100 (default), 500, or 1000.<br />The cleanup session may have an impact on the overall system performance. Configure the maximum limit for your environment.                                                                                                                                                                                                                              |
| Automatically delete devices in selected states on a schedule     | Selecting this check box expands the Delete Schedule Configuration section.<br />- Daily: Select the run time from the At: drop-down menu. The default is midnight.<br />- Weekly: Select the day and time for the clean up. Default value is Sunday at midnight.<br />- Monthly: Select the time for a first-day-of-the-month schedule frequency. Default is first day of the month at midnight. |

4. Select Delete Now
5. Select Save to save the configuration.

:::hint{type="info"}
If the <font color="#323232">Delete Now</font> button is disabled, only an administrator who is a “super administrator” can assign you to the global space and assign the Delete retired device administrator role to you. The procedure for the super administrator and definition of a super administrator are in [Assigning an administrator the role to delete retired devices](docId\:JADqN2cUzdiZJt9SXO2ma).
:::
::::

::::ExpandableHeading
## Retire the Retire Pending devices that have not been checked-in N days

1. In the Admin Portal, go to Settings > System Settings.
2. <font color="#323232">Select </font>Users & Devices > Automated Device Cleanup. The Automated Device Cleanup page opens.
3. Enter the settings as per below:

*Table 19. Retire the Retire Pending devices*

| Field                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Retire the Retire Pending Devices that have not been checked in for more than | - Days: 30 days is default, 365 days is maximum allowed.<br />- Hours: 1 hour is default, 23 hours is maximum allowed.<br />                                                                                                                                                                                                                                                                                                 |
| Show retire pending devices list                                              | Selecting the link opens the Advanced searching page in Devices & Users and poplulates the search with the regular expression for the search. Select Search.                                                                                                                                                                                                                                                                 |
| Maximum Retire Pending devices to Retire in Each Session                      | Select 100 (default), 500, or 1000.<br />The cleanup session may have an impact on the overall system performance. Configure the maximum limit for your environment.                                                                                                                                                                                                                                                         |
| Automatically Retire the Retire Pending Devices on a schedule                 | Selecting this check box expands the Retire the Retire Pending Devices Schedule Configuration section.<br />- Daily: Select the run time from the At: drop-down menu. The default is midnight.<br />- Weekly: Select the day and time for the clean up. Default value is Sunday at midnight.<br />- Monthly: Select the time for a first-day-of-the-month schedule frequency. Default is first day of the month at midnight. |

4. Select Force Retire the Retire Pending Devices Now OR Force Retire All the Retire Pending Devices.
5. Select Save to save the configuration.

:::hint{type="info"}
If the Force Retire the Retire Pending Devices Now OR Force Retire All the Retire Pending Devices button is disabled, only an administrator who is a “super administrator” can assign you to the global space and assign the Delete retired device administrator role to you. The procedure for the super administrator and definition of a super administrator are in [Assigning an administrator the role to delete retired devices](docId\:JADqN2cUzdiZJt9SXO2ma).
:::
::::

