This sound like you're definitely on the right track by deleting DAM assets and running oak-run to compact the repository, but there are a few key reasons why the overall size of your AEM instance might not be reducing as much as expected — especially in AEM 6.4.
Why the Repository Size Didn't Drop Much:
- Pages May Still Reference Deleted DAM Assets
Even though the assets are gone from /content/dam, site pages that were using them might still contain references (like fileReference or data properties). These lingering references can prevent the garbage collection and compaction process from fully cleaning them out.
- Version History Still Retains Data
AEM automatically stores older versions of assets and pages under /jcr:system/jcr:versionStorage, which can build up over time. Deleting assets doesn’t automatically remove their version history — and that version history can be huge.
- Workflows, Audit Logs, and Other System Nodes Add Up
Paths like /var/workflow/instances, /var/audit, and /var/eventing can grow silently and hold on to data even after assets are deleted. These should also be purged regularly.
- Assets Might Be Embedded in Pages Instead of Stored in DAM
In some cases, assets are uploaded directly inside components at the jcr:content level of a page, like:
- /content/mysite/en/page/jcr:content/image/file
These types of binary files don’t live in DAM, so deleting DAM assets doesn’t affect them — and since they’re tied to pages, they also get versioned. This is one of the reasons why using the DAM (/content/dam) is a best practice in AEM: it keeps assets centralized, processed by asset workflows, and much easier to manage and clean up.
What You Can Do Next:
- Run a version purge: Use the official Adobe AEM Version Purge Configuration: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/deploying/conf... to automatically remove old versions of assets and pages. This helps clear data stored under /jcr:system/jcr:versionStorage.
- Check for embedded binaries in /content: Use a query or Groovy script to scan for file nodes or jcr:content/renditions under your site structure. These are often large, directly embedded binaries that don’t live in DAM and can silently grow over time.
- Purge workflows and audit data: Clean up system paths like /var/workflow, /var/audit, /var/eventing, and others that may store large logs or payloads long after they're needed.
Re-run oak-run compaction after the cleanup steps — and make sure AEM is fully stopped when doing this to ensure maximum cleanup efficiency.
Let me know how it goes.