File Analyzer Extension Simplifies File Cleanup for CiviCRM Administrators
Keeping uploaded files organized in CiviCRM can quickly become difficult as activities, contributions, and custom fields accumulate attachments over time. The newly released File Analyzer extension by Skvare offers a solution by identifying unused, duplicate, or orphaned files across the system, helping administrators manage storage efficiently and securely.
The File Analyzer extension runs regular scans of CiviCRM file directories and cross-references each file with database records. It determines whether a file is still associated with an entity such as a contact, activity, or custom field. Files without references are marked as abandoned, while duplicates are grouped for review. All scan data is stored in a structured database table, which can be used with SearchKit to create visual dashboards and custom reports for easier management.
Administrators can sort files by type or size, view image previews, and verify file usage. Once identified, abandoned files can be removed manually through the CiviCRM interface or automatically via scheduled jobs. The extension uses batch processing to ensure efficient scanning of large datasets and confirms deletion safety by verifying all associations before removing any file. Every deletion is logged for traceability and accountability.
In one deployment, File Analyzer scanned 145,000 files and flagged over 30,000 as abandoned, while removing more than 80,000 duplicates. This resulted in a disk usage reduction of over 100 gigabytes, significantly improving performance and cutting storage costs. These results highlight the value of proactive file management for long-running CiviCRM installations.
By introducing clarity and automation, the extension makes it easier to maintain a clean, optimized, and secure environment. It was built using APIv4 and adheres to modern development standards, making it a robust addition to any CiviCRM setup where file uploads are frequent and storage needs continue to grow.
