Durable Objects, Workers - deleteAll() now deletes Durable Object alarm
Key Points
- deleteAll() removes Durable Object alarms
- Applies to KV and SQLite-backed Durable Objects
- Requires compatibility date 2026-02-24+
Summary
As of Workers compatibility date 2026-02-24, storage.deleteAll() on Durable Objects also removes the object's alarm metadata in addition to stored data. Previously you needed to call deleteAlarm() separately to fully clear an object's storage. This change applies to both KV-backed and SQLite-backed Durable Objects.
Key Points
- deleteAll() now deletes Durable Object alarm metadata as well as user-stored data.
- Applies to Durable Objects with compatibility date 2026-02-24 or later.
- Works for both KV-backed and SQLite-backed Durable Objects.
- Previously required two calls (deleteAlarm() + deleteAll()); now a single call suffices.
- No change for objects running older compatibility dates.
Example
JavaScript
// Before: two API calls required to clear all storage
await this.ctx.storage.deleteAlarm();
await this.ctx.storage.deleteAll();
// Now: a single call clears both data and the alarm
await this.ctx.storage.deleteAll();
Action for engineers
- Remove explicit deleteAlarm() calls if you target compatibility date 2026-02-24 or later.
- Test cleanup and migration paths to avoid unintended deletions when upgrading the compatibility date.
- See the Storage API documentation for details and edge cases.