Retention Policies | Leapwork Docs

Retention policies in Leapwork manage the growing data from automation flows, ensuring optimal disk space use on the Controller machine.

Note: These settings are only available when you’re logged in as an administrator.

Scheduled Runs Policy

This policy applies to flows executed via schedules. Administrators can define how long results and videos from scheduled flows should be retained. The available settings allow you to manage retention in the following ways:

When selected, the Remove success run videos after 1 hour checkbox automatically deletes videos of successful scheduled runs one hour after completion, optimizing disk space usage.

Recommendation: Configure retention policies according to your automation run frequency to balance storage and data availability.

Configuration scope: Team-level. Settings are configured per team, and each team can define its own retention policy.

Preview Runs Policy

This option is specifically designed for flows executed manually, without an initial schedule.

Checked: The retention settings for Preview Runs will inherit the configurations defined for Scheduled Runs.

Unchecked: You can configure separate retention settings for Preview Runs, but the options available (for example, the number of days or total results retained and the "remove success run videos after 1 hour" checkbox are the same as those for Scheduled Runs).

Recommendation: Keep videos of failed runs for debugging and analysis and delete successful run videos promptly.

Configuration scope: Team-level. Settings are configured per team, and each team can define its own retention policy.

Temp Folder Policy

This section allows users to define how long assets in the temporary folder should be retained. It helps maintain control over temporary files and optimizes storage. You can set the retention period between 1 and 90 days.

Recommendation: Regularly review and adjust this setting to prevent storing outdated temporary files and maintain optimal disk space.

Configuration scope: Global. Settings are configured globally and apply to all teams.

Audit Log

The Audit Log retention policy controls how long Leapwork keeps records of system and user activities, such as configuration changes, flow updates, and administrative actions.

You can choose between 30, 60, or 90 days (90 days is the default).

Recommendation: Choose a shorter period (for example, 30 days) in environments with high audit activity to reduce database size, and a longer period (60–90 days) when you need extended traceability for compliance or investigations.

This prevents large clean-ups from impacting performance in a single day.

Configuration scope: Global. Settings are configured globally and apply to all teams.

Only items that exceed the configured retention period are eligible for deletion. The actual number of items removed per day will never exceed the Daily deletion cap, even if more items are available. If the configured limits are too low, old data may take several days to be fully cleaned up.

Flow Version History

The Flow Version History retention policy manages how long flow versions are stored as changes are made to automation flows. It helps keep version history under control while preserving enough versions for review and rollback.

You can choose between 30, 60, or 90 days (90 days is the default).

This ensures clean‑up happens gradually instead of removing too many versions at once.

Smaller batch sizes are safer for busy systems; larger batches speed up the clean‑up process.

Configuration scope: Global. Settings are configured globally and apply to all teams.