List and Remove all expired scratch orgs

List all connected Orgs in Vs Code

Using following salesforce cli command to get all salesorce orgs with connection status.

sf org list --all

Remove expired scratch orgs from VS code cli

Remove expired/deleted scratch orgs from vs code.
sf org list --clean
Flags:
  • --all : Include expired, deleted, and unknown-status scratch orgs.
  • --clean : Remove all local org authorizations for non-active scratch orgs.

Source:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_org_commands_unified.htm#cli_reference_org_list_unified

Labels:
Join the conversation