wrangler versions secret bulk supports deleting secrets
Introduced 2026-10-06 · score 0.98
HOW TO USE IT
When removing secrets from a new Worker version, set each secret’s value to `null` in JSON input, inspect bulk output for created and deleted secrets, then deploy the version to production traffic.
npx wrangler versions secret bulk <secrets.json>npx wrangler versions deploy <version-id>@100%WHY THIS HELPS
Remove secrets from a new Worker version and apply the requested deletions to production traffic.
REQUIREMENTS AND LIMITATIONS
- Version: 4.148.0
- [FILE]: File of key-value pairs in JSON or `.dev.vars` format; when omitted, the docs do not specify stdin behavior for this command.
- --name: Worker name.
- --message: Description of the version deployment.
- --tag: Tag for the version.
- [VERSION-SPECS]: Version shorthand `<version-id>@<percentage>`; use `100%` to assign all traffic to that version.
- Prerequisite: Secret bulk input must be JSON to request deletions with `null`; `.env` format does not support deletion.
- Deletion applies to the new Worker version; deploy that version with `wrangler versions deploy` to apply the changes to production traffic.
- Docs conflict: The current Wrangler command docs describe `versions secret bulk` as creating or updating a secret and do not document null-based deletion, while the v4.148.0 release note says it supports deletion. Follow the release note for that changed behavior.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.148.0
- https://developers.cloudflare.com/workers/wrangler/commands/workers/
Check the installed version and the source before using it. Entry JSON