← Back
Cloudflare
Cloudflare's deleteAll() now clears Durable Object alarms, reducing API calls

Simplified Durable Object Cleanup

Cloudflare has updated the deleteAll() method for Durable Objects to automatically clear alarm metadata in addition to user-stored data. Previously, developers needed to make two separate API calls to fully clean up a Durable Object's storage.

What Changed

Before: Clearing all storage required two calls

await this.ctx.storage.deleteAlarm();
await this.ctx.storage.deleteAll();

Now: A single call handles everything

await this.ctx.storage.deleteAll();

Impact and Scope

This change simplifies storage management by eliminating the need for sequential API calls. Alarm usage in Durable Objects stores metadata within the object's storage layer, which now gets cleaned up automatically. The improvement applies to both KV-backed and SQLite-backed Durable Objects.

How to Use

The new behavior is automatically enabled for Workers with a compatibility date of 2026-02-24 or later. Existing applications are unaffected unless explicitly updated to the new compatibility date. Developers should review their cleanup routines and can consolidate dual calls into a single deleteAll() operation.