java -jar oak-run-*.jar checkpoints /(path of aem installed folder)/crx-quickstart/repository/segmentstore
java -jar oak-run-*.jar checkpoints /(path of aem installed folder)/crx-quickstart/repository/segmentstore rm-all
java -jar oak-run-*.jar compact /(path of aem installed folder)/crx-quickstart/repository/segmentstore
This will cleanup redundant data from repository.
2) Online compaction:
Go to /libs/granite/operations/config/maintenance/granite:daily/granite:RevisionGC > property named granite.operations.condition.runmode to "crx3" from "crx3-disabled". The current value should be "crx3".
Download oak hotfix from package of version same as your crx version. Install it.
To enable the online compaction, simply add the property "pauseCompaction" with value "false" in the below config. Create/Use the following config file to add it, for example:
Note:The online compaction is less efficient than offline compaction and its effect can only be observed over a prolonged period of time (a couple of days). You should not expect removed content to be garbage collected right away as the content might still be referenced by other sessions
Offline compaction gives immediate results on successful run than online