Device Cleanup Configuration
Configure automated device cleanup settings to maintain app data persistence and device hygiene.
Inconsistent device states and repetitive setup tasks can slow down testing workflows. BrowserStack’s Custom Device Lab addresses these challenges with customizable device cleanup options, allowing you to retain critical data or configurations between sessions while maintaining device performance and reliability.
Unlike public cloud environments, where device cleanup processes are standardized, Custom Device Lab offers greater flexibility and control. You can configure cleanup settings at the Global, Team, or Device level, or trigger a manual cleanup when a fresh state is required immediately.
How device cleanup works
After each test session, the device undergoes a cleanup process based on your configuration. The following cleanup preferences are available:
-
Reset: Wipes all user data and settings after each session, restoring the device to its original factory state, which is best for strict test isolation requirements.
-
Persistence: Retains user data, installed apps, and app states between sessions to reduce setup time for iterative testing. The following are two types of persistence options available:
- Default: Performs system cleanup for essential maintenance.
- BETA: An optimized version of default persistence achieving faster boot times by skipping multiple cleanup steps to minimize device preparation time.
![Screenshot showing the three cleanup preferences: Reset, Persistence (Default), and Persistence [BETA] options in the device cleanup settings interface](/docs/static/img/private-devices/device-cleanup/persistence-fastest.webp)
Selecting the option Retain user data between sessions retains user data between sessions. The system still performs essential maintenance and basic checks to ensure device health and stability, enabling faster reuse for testing.
For more information on data retention, refer to app-persistence.
On-Demand Device Cleanup (Wipe Device)
There are scenarios where you may need a fresh device state immediately—for example, when debugging a specific issue or switching test scenarios—regardless of your configured persistence settings.
You can trigger a Wipe Device action directly from the dashboard. This performs a full cleanup, removing all data and settings to restore the device to a clean state.
To trigger a manual cleanup:
- Go to the Device Management Dashboard.
- Locate the specific device you wish to clean, or select multiple devices using the checkboxes to apply cleanup to multiple devices at once.
- Click the Actions menu (ellipsis icon) for that device.
- Select Wipe Device.
- Confirm the action in the warning modal.
Note:
- This action is restricted to Group Owners and Admins.
- You cannot wipe a device if it is currently “In Use,” “Rebooting,” “Offline,” or “Blocked.”
- Rate limits apply to how frequently a single device can be wiped to prevent hardware degradation.
Rate limiting
To prevent misuse and ensure stability, a rate limit applies to the device cleanup functionality.
- Limit: By default, you can wipe a single device a maximum of 5 times per device per day.
- Reset: This limit resets at midnight UTC every day.
- Error: If you exceed the limit, the button will be disabled.
Manage Cleanup Preferences
BrowserStack allows you to configure cleanup preferences with high granularity. You can set defaults for your entire organization or customize settings for specific teams and individual devices. You can apply the same preference to multiple teams or devices at once by selecting them with checkboxes.
Understanding Preference Hierarchy
When determining which cleanup logic to apply to a device, the system follows a specific hierarchy. More specific settings always override general settings:
- Device Level (Highest Priority): Settings applied to a specific device.
- Team Level: Settings applied to a Team.
- Global (GID) Level (Lowest Priority): The default setting for the entire organization.
Configure Global Preferences
This sets the default behavior for all devices in your organization.
- On the Device Management Dashboard, navigate to the Cleanup Settings tab.
- Select the Global view (or Organization Settings).
- Choose your cleanup preference:
- Reset (wipes all user data and settings after each session).
-
Persistence (retains user data and app state between sessions). If you select Persistence, choose one of the following options:
- Default (system cleanup for essential maintenance).
- BETA (optimized cleanup for faster device readiness).
- Click Update Global preference.

Configure Team Preferences
This applies settings to all devices belonging to a specific team.
- Navigate to the Cleanup Settings tab on the Device Management Dashboard.
- Select the Teams tab.
- Locate the Team you wish to configure and click Configure.
- Choose your cleanup preference:
- Reset (wipes all user data and settings after each session).
-
Persistence (retains user data and app state between sessions). If you select Persistence, choose one of the following options:
- Default (system cleanup for essential maintenance).
- BETA (optimized cleanup for faster device readiness).
- (Optional) Check Apply to all devices to reset any individual device-level overrides within this team.
- Click Save preference.

Configure Device Preferences
This applies settings to a single specific device or multiple devices, overriding Team and Global settings.
- Go to the Device Management Dashboard and view the Device list.
- Click on a specific device to view its details or use the Actions menu.
- Select Configure Cleanup.
- Choose your cleanup preference:
- Reset (wipes all user data and settings after each session).
-
Persistence (retains user data and app state between sessions). If you select Persistence, choose one of the following options:
- Default (system cleanup for essential maintenance).
- BETA (optimized cleanup for faster device readiness).
- Click Save preference.

Related topic
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!