> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# infisical logout

> End a login session

```bash theme={"dark"}
infisical logout
```

## Description

This command ends a login session. The CLI removes the stored credentials of the profile from this machine, and revokes its session on the server when no other profile still uses that session.

The profile is kept, so `infisical login --profile <name>` signs back in without setting it up again. To remove the profile as well, run `infisical profile delete`.

By default the command logs out of the profile that the current directory and terminal are set to. See [profile](./profile) for how the CLI selects profiles.

<Info>
  While each profile stores its own credentials, multiple profiles for one
  account on a single machine share a server session. Logout always removes the
  current profile's credentials, and revokes the shared session only when no
  profile that you keep still uses it.
</Info>

### Flags

<AccordionGroup>
  <Accordion title="--all">
    Log out of every profile on this machine.

    ```bash theme={"dark"}
    infisical logout --all
    ```
  </Accordion>

  <Accordion title="--local-only">
    Remove the stored credentials without revoking the session on the server. The session stays valid until it expires.

    ```bash theme={"dark"}
    infisical logout --local-only
    ```
  </Accordion>

  <Accordion title="--profile">
    Log out of a specific profile.

    ```bash theme={"dark"}
    infisical logout --profile globex
    ```
  </Accordion>
</AccordionGroup>
