You can schedule or manually trigger the nodeServiceCleanupTrigger script to clean up deleted nodes, dangling transactions, and property values tables (i.e. alf_transaction, alf_node and alf_node_properties tables).
The nodeServiceCleanupTrigger is a MonitoredCronTrigger script, and a schedule to run this script can be set in the alfresco-global.properties file or by using JMX.
To run this script on a schedule, add the following line to the alfresco-global.properties file:
system.nodeServiceCleanup.cronExpression=0 0 21 * * ?
The default setting for this property is a Quartz Cron expression, 0 0 21 * * ?, which runs every day at 9pm. Alfresco recommends that you don’t change the default value unless required.
Below are the default settings for the V1 cleanup job:
# --Node cleanup batch -default settings system.node_cleanup.delete_batchSize=1000 system.node_table_cleaner.algorithm=V1 index.tracking.minRecordPurgeAgeDays=30 index.tracking.purgeSize=7200000