Apex_cleaner.zip -
ApexCleaner.cls : The main engine containing logic to query and delete records (e.g., old Debug Logs, stalled Flow Interviews, and expired Tasks).
: Automatically deletes ApexLog records to prevent storage bloat.
JSZip.resource : Used if the cleaner requires client-side zip handling in Lightning Components. Apex_Cleaner.zip
: Utilizes the Compression namespace (available in Spring '26) to archive data before deletion if backups are required. Deployment Instructions
Compress and Extract Zip Files in Apex (Generally Available) ApexCleaner
: Identifies and removes Attachment or ContentDocument records that are no longer linked to active parent records.
: Navigate to Static Resources in Setup and upload the Apex_Cleaner.zip if using it for LWC, or use Deployment Settings for code installation. : Utilizes the Compression namespace (available in Spring
: Run the following in the Developer Console to start the daily cleanup: