Device cleanup in Private Devices
Manage device cleanup preferences and perform on-demand cleanup on BrowserStack’s Private Devices.
Inconsistent device states and repetitive setup tasks can slow down testing workflows. BrowserStack’s Private Devices 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, Private Devices 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. Generally, there are two modes:
-
Retain user data between sessions (Default):
- User data, installed apps, and app states persist between sessions.
- Reduces setup time for iterative testing.
- Essential device-level maintenance is still performed to ensure system health.
-
Reset all user data after each session:
- The device is completely wiped (apps uninstalled, data cleared).
- Restores the device to its original factory state.
- Ideal for strict test isolation requirements.
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 (public cloud style), 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.
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 take precedence over Team and Global settings.
- Team Level: Settings applied to a Team take precedence over Global settings, but are overridden by Device-level settings.
- Global (GID) Level (Lowest Priority): The default setting for the entire organization. Applies to all devices unless overridden by a Team or Device setting.
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 preference:
- Retain user data between sessions
- Reset all user data after each session
- Important: If you want to force this setting on all teams and devices (removing their specific overrides), check the box Apply this cleanup preference to all devices. You can also select multiple devices from the device list and apply cleanup preferences to them simultaneously.
- Click Update Preference.

Configure Team Preferences
This applies settings to all devices belonging to a specific team. You can select multiple teams to apply the same cleanup preferences to all their devices at once.
- 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, or select multiple teams using checkboxes to configure cleanup settings for multiple teams simultaneously.
- Select the desired cleanup behavior.
- (Optional) Check Apply to all devices to reset any individual device-level overrides within this team.
- Click Save.

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. Alternatively, select multiple devices using checkboxes to configure cleanup preferences for multiple devices at once.
- Select Configure Cleanup.
- Choose the desired cleanup behavior for the selected device(s).
- Click Save.

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!