sf org delete scratch also deletes sandboxes
Summary
Using the sf org delete scratch command while using a Sandbox as your default org will also delete the target org even if it is not a scratch org.
Steps To Reproduce
- Auth with a Sandbox (Full, PC or Dev does not matter)
- Set it as target org in VS Code
- Use
org delete scratchcommand
Expected result
Report back that I am not able to delete a Sandbox with the delete scratcg command
Actual result
Org gets deleted
Additional information
Wondering why there even are separate commands if there is no failsafe for sandboxes getting deleted with scratch command.
System Information
{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.61.8",
"nodeVersion": "node-v22.9.0",
"osVersion": "Darwin 23.6.0",
"rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.5 (core)",
"@oclif/plugin-commands 4.0.16 (core)",
"@oclif/plugin-help 6.2.13 (core)",
"@oclif/plugin-not-found 3.2.22 (core)",
"@oclif/plugin-plugins 5.4.10 (core)",
"@oclif/plugin-search 1.2.10 (core)",
"@oclif/plugin-update 4.5.10 (core)",
"@oclif/plugin-version 2.2.14 (core)",
"@oclif/plugin-warn-if-update-available 3.1.18 (core)",
"@oclif/plugin-which 3.2.15 (core)",
"@salesforce/cli 2.61.8 (core)",
"apex 3.5.0 (core)",
"api 1.2.2 (core)",
"auth 3.6.65 (core)",
"data 3.6.8 (core)",
"deploy-retrieve 3.12.15 (core)",
"info 3.4.9 (core)",
"limits 3.3.32 (core)",
"marketplace 1.2.26 (core)",
"org 4.6.0 (core)",
"packaging 2.4.5 (user)",
"schema 3.3.34 (core)",
"settings 2.3.23 (core)",
"signups 2.0.13 (link) /opt/homebrew/lib/node_modules/@salesforce/plugin-signups",
"sobject 1.4.40 (core)",
"source 3.5.21 (core)",
"telemetry 3.6.15 (core)",
"templates 56.3.21 (core)",
"trust 3.7.32 (core)",
"user 3.5.32 (core)",
"sfdmu 4.33.17 (user)",
"sfdx-git-delta 5.40.0 (user)",
"sfdx-hardis 4.52.0 (user)"
]
}
Hello @dschibster :wave: It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).
A few more things to check:
- Make sure you've provided detailed steps to reproduce your issue.
- A repository that clearly demonstrates the bug is ideal.
- Make sure you've installed the latest version of Salesforce CLI. (docs)
- Better yet, try the
rcornightlyversions. (docs)
- Better yet, try the
- Try running the
doctorcommand to diagnose common issues. - Search GitHub for existing related issues.
Thank you!
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Thanks @dschibster for bringing this up - I agree that org delete scratch shouldn't delete sandboxes. I'll get this on the backlog
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.
This issue has been linked to a new work item: W-16972747
This issue is fixed in 2.68.6 (December 4, 2024).