Skip to content

Instantly share code, notes, and snippets.

@mshanemc
Created November 29, 2017 23:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshanemc/e5d782683c93a2117fde72570f8301be to your computer and use it in GitHub Desktop.
Save mshanemc/e5d782683c93a2117fde72570f8301be to your computer and use it in GitHub Desktop.
cleaning up old scratch orgs from your dev hub with SFDX
// ScratchOrgInfo is an object in your dev hub
delete [select id from ScratchOrgInfo where Status = 'Deleted'];
# reference an apex script
sfdx force:apex:execute -f scripts/cleanScratchInfo.cls -u hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment