auth:logout (Deprecated)

Log out from authorized orgs.

This command is deprecated. As of April 20, 2023, we no longer maintain this section of the command reference. Refer to the reference information about the sf-style commands instead, which we update regularly. We keep this reference information about the sfdx-style commands as-is for historical reference only.

Don't worry, this command and its flags continue to work the same as before, and any scripts that use the command won’t break. However, we recommend that you start using the equivalent sf-style org logout command instead. Here’s how the flags changed between the old and new commands; if a flag isn't listed, the old and new names are the same:

  • Removed flag: --loglevel. Use the SF_LOG_LEVEL environment variable instead.
  • Removed flag: --apiversion
  • Changed flag name: Old name --targetusername. New name: --target-org`, with new short name `-o`.
  • Changed flag name: Old name --noprompt. New name: --no-prompt.

For background information about this change, read this blog post, which describes how we've updated many of the existing sfdx commands to use the improvements we made in sf. We improved this particular command on March 2, 2023.

Warning

Help for auth:logout

By default, this command logs you out from your default scratch org.

Examples for auth:logout

1sfdx auth:logout -u me@my.org
1sfdx auth:logout -a
1sfdx auth:logout -p

Command Syntax

sfdx auth:logout
[--json]
[--loglevel LOGLEVEL]
[-u TARGETUSERNAME]
[--apiversion APIVERSION]
[-a]
[-p]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-u | --targetusername TARGETUSERNAME
Optional

A username or alias for the target org. Overrides the default target org.

Type: string
--apiversion APIVERSION
Optional

Override the API version used for API requests made by this command.

Type: string
-a | --all
Optional

Includes all authenticated orgs: for example, Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.

Type: boolean
-p | --noprompt
Optional

Do not prompt for confirmation.

Type: boolean

Aliases for auth:logout

1force:auth:logout