4

Now that DX has been around for a minute and it's almost 2 years since this question was posed from a CLI perspective, I thought it would be worth asking. Is there yet a convenient way to remove expired scratch orgs from my list within VS Code?

enter image description here

Currently when I click on the current default org (above), I get the following list (below). These are all outdated, I wish they would auto remove themselves, but since they apparently don't, what is the best way to manage them? enter image description here

  • If you want a more gui-oriented solution, you could create a VS Code extension that executes that command in Javascript that is accessible through the VS Code command palette, or extend the default cli with a dx extension. Either is feasible – trebleCode Apr 19 at 0:39
5

There's no GUI for it, but you can go to the terminal and type in the following command:

sfdx force:org:list --clean

This will clear up all expired scratch orgs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.