I've been testing some automated deployment stuff lately, and it's generating a lot of scratch orgs. So I hit my allowed limit.
Of course, I could force:org:list and than delete each one.
But I'm really, really lazy.
Here's a simple file that I keep in a /scripts folder in my the same folder I keep all my projects.
delete [select id from activeScratchOrg];
You can run this by saying
sfdx force:apex:execute -f [wherever you put that file] -u [the alias for your hub]
If you didn't know, activeScratchOrg is just another object. I named my hub
hub to make life simple.