Mass Delete Scratch Org
Mass delete scratch orgs
Scratch orgs are ActiveScratchOrg records in the Dev Hub, so you can query them all in the Developer Console and use "Delete Row" to remove them in one pass instead of one at a time.
How to delete multiple scratch orgs at once?
To delete a single scratch org, use the App Launcher and search for "Active Scratch Orgs". But how do you delete all of them in one click?
Delete them from the Developer Console
Open the Developer Console.
Use the Query Editor to view records from the ActiveScratchOrg object.
SELECT Owner.Name, CreatedDate, Id, Name, SignupUsername, SignupInstance, ScratchOrgInfo.LoginUrl, OrgName
FROM ActiveScratchOrg
ORDER BY CreatedDate ASCSelect which rows you would like to delete and click "Delete Row".
Deletion is an asynchronous process, it should take less than 30 seconds.
Click "Refresh Grid" to see the current status.


