Skip to content

Instantly share code, notes, and snippets.

@justin-lyon
Created February 21, 2020 16:53
Show Gist options
  • Save justin-lyon/51dafbb2e6d6345919f58b5b41211c44 to your computer and use it in GitHub Desktop.
Save justin-lyon/51dafbb2e6d6345919f58b5b41211c44 to your computer and use it in GitHub Desktop.
Clean up sfdx sandbox credentials
# List out the currently registered orgs
sfdx force:org:list
# change directory to user_root/.sfdx
cd ~/.sfdx
# (windows) open directory in explorer
explorer .
# credentials are stored in .json files named for each username.
# delete files that belong to old username/sandboxes
# confirm they're gone
sfdx force:org:list
# Setup a new credential
# -a is the alias for the new sandbox cred
# -r is the target sandbox url
sfdx force:auth:web:login -a <alias> -r https://<mydomain>.my.salesforce.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment