logout Commands
logout
Description for logout
By default, the command prompts you to select which environments you want to log out of. Use --no-prompt to not be prompted and log out of all environments.
Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.
Examples for logout
Interactively select the environments to log out of:
1sf logoutLog out of all environments, without being prompted:
1sf logout --no-promptUsage
- sf logout
- [--json]
- [--no-prompt]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- --no-prompt
- Optional
-
Don't prompt for confirmation; logs you out of all environments.
- Type: boolean
logout org
Description for logout org
By default, the command prompts you to confirm that you want to log out of the specified org. Use --no-prompt to not be prompted.
Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.
Examples for logout org
Log out of an org with alias "ci-org":
1sf logout org --target-org ci-orgIf your org doesn’t have an alias, specify the username that you used when you logged into it:
1sf logout org --target-org jdoe@example.orgUsage
- sf logout org
- [--json]
- -o TARGET-ORG
- [--no-prompt]
Flags
- --json
- Optional
-
Format output as json.
- Type: boolean
- -o | --target-org TARGET-ORG
- Required
-
Org alias or username to log out of.
- Type: option
- --no-prompt
- Optional
-
Don't prompt for confirmation.
- Type: boolean