Newer Version Available
Log Out of an Org
For security purposes, you can use the Salesforce CLI to log out of any org you’ve
previously authorized. This practice prevents other users from accessing your orgs if you don’t
want them to.
To log out of an org, run org logout from a terminal (macOS and Linux) or command prompt (Windows). This example uses the alias my-hub-org to log out.
1sf org logout --target-org my-hub-orgTo log out of all your orgs, including scratch orgs, use the --all flag.
1sf org logout --allTo access an org again, other than a scratch org, reauthorize it.
When you log out of an org, it no longer shows up in the org list output. If you log out of a Dev Hub org, the associated scratch orgs show up only if you specify the --all flag.