How to Clean Up The List of Orgs on force:org:list on Salesforce DX

How to Clean Up the List of Orgs:

To quickly find the list of orgs recently authorised, you run the command sfdx force:org:list . The command results should display a list of scratch orgs and orgs either connected or no longer in use.

sfdx force:org:list
sfdx force:org:list

You have two options to clean up the list.

  • Remove the org by logging off
  • Delete the scratch org

Remove the org by logging off.

sfdx force:auth:logout -u <alias>
sfdx force:auth:logout -u <alias>

You get this confirmation screen and important reminder if you want to reuse your scratch org you must know the pasword before logging out.

Delete the scratch org

sfdx force:org:delete -u <alias>

Try it out which sfdx command works for you to remove the unused and inactive orgs from the list. Post the results on the comment section below.

Leave a Reply

Your email address will not be published. Required fields are marked *