Attachment Cleanup

Description

Attachments will continue to grow on your site over time. This increases backup times and general performance. The CLI provides some simple ways to prune the list of attachments for a page and that can be combined with runFrom actions to do so across pages and spaces. It provides a simple way of keeping on a set number of the most recent attachment versions.

--action removeAttachmentVersions --limit 15 --name xxx.png --space XXX --title "Images"

This works best if the policy is the same across all attachments, pages, and spaces. However, if you need to customize this based on various criteria, it would be best to use a more database driven approach to the cleanup. Perhaps removing items based on age or based on compressing dates. 

Solution