#8995 Unexpected D1 Database Deletion Behaviour in Wrangler CLI
PR #11117 (merged 2025-10-30) explicitly fixes this issue. D1 commands now show local/remote status before confirmations. Released in wrangler 4.45.3.
Close with comment explaining fix is available
Analysis Report
Issue Review: cloudflare/workers-sdk#8995
Summary
User accidentally deleted production D1 database because wrangler d1 delete does not clearly indicate whether it's targeting local or remote resources.
Findings
- Created: 2025-04-17
- Updated: 2025-12-14
- Version: 4.1.1 (reported) / 4.11.1 (in error logs) -> 4.60.0 (current)
- Component: D1 (wrangler)
- Labels: bug, quick win, error-messaging
- Comments: 2 (other users experiencing same issue)
Key Evidence
- PR #11117 explicitly fixes this issue (merged 2025-10-30)
- Title: "print d1 resource locations take 2"
- PR body states: "Fixes https://github.com/cloudflare/workers-sdk/issues/7657 and https://github.com/cloudflare/workers-sdk/issues/8995"
- Adds
printResourceLocationto D1 commands includingd1 delete - Makes
wrangler d1 delete"more explicit that it will be operating on a remote resource"
- Released in wrangler 4.45.3 (changelog entry: "fix: show local/remote status before D1 command confirmations")
- Current version 4.60.0 includes this fix
Recommendation
Status: CLOSE
Reasoning: PR #11117 was merged on 2025-10-30 and explicitly fixes this exact issue. The fix was released in wrangler 4.45.3. D1 commands (including d1 delete) now display "Using local resources" or "Using remote resources" before any confirmation prompts, addressing the user's request for more verbose warnings.
Action: Close the issue with a comment explaining the fix.
Suggested Comment
This issue has been fixed in PR #11117, released in wrangler 4.45.3. D1 commands (including
d1 delete) now display whether they're operating on local or remote resources before any confirmation prompts. Please update to the latest version of wrangler (currently 4.60.0) to get this improvement.Thank you for reporting this and sorry for the inconvenience caused!
Notes & Feedback (0)
No notes yet.