Trim Archive History (Data Management)


Deletes retired archive records from nonversioned archive-enabled datasets.

Over time, the archive history of a table can grow exponentially as the history of all edits are maintained. This can affect decisions about storage and backup management and may affect performance if the data outgrows the system in place. Some organizations may use nonversioned archiving because it is required for certain functionality and have no need for historical records or want to trim older data that is no longer relevant. This tool allows you to delete all retired rows or the retired rows older than a specified date.

Learn more about trimming the archive history


  • This tool only supports datasets that are stored in an enterprise geodatabase. The supported databases include the following:

    • IBM Db2
    • Microsoft SQL Server
    • Oracle
    • PostgreSQL
    • SAP HANA

  • The input table must be archive enabled.

  • The input table must be nonversioned. Versioned tables are not supported.

  • To run this tool, you must be connected to the geodatabase as the data owner.

  • You can access the last trimmed date of a dataset from the feature class or table properties dialog box.

Syntax, trim_mode, {trim_before_date})
ParameterExplanationData Type

The nonversioned archive-enabled table with the archive history to be trimmed.

Table View

Specifies the trim mode to be used to trim the archive history.


At ArcGIS Pro 2.6, only the delete trim mode is available.

  • DELETEThe archive records will be deleted.

Archive records older than this date and time will be deleted. The date and time must be in UTC. If no date is provided, all archive records will be deleted.


Derived Output

NameExplanationData Type

The updated input table with the trimmed archive history.


Code sample

TrimArchiveHistory example (Python window)

Trim the archive records of a table older than a specific date and time.

import arcpy
                                    "DELETE", "3/10/2020 10:28:56 AM")


This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics