1---
2layout: "docs"
3page_title: "Command: logout"
4sidebar_current: "docs-commands-logout"
5description: |-
6  The terraform logout command is used to remove credentials stored by terraform login.
7---
8
9# Command: logout
10
11The `terraform logout` command is used to remove credentials stored by
12`terraform login`. These credentials are API tokens for Terraform Cloud,
13Terraform Enterprise, or any other host that offers Terraform services.
14
15## Usage
16
17Usage: `terraform logout [hostname]`
18
19If you don't provide an explicit hostname, Terraform will assume you want to
20log out of Terraform Cloud at `app.terraform.io`.
21
22-> **Note:** the API token is only removed from local storage, not destroyed on
23the remote server, so it will remain valid until manually revoked.
24
25## Credentials Storage
26
27By default, Terraform will remove the token stored in plain text in a local CLI
28configuration file called `credentials.tfrc.json`. If you have configured a
29[credentials helper program](/docs/cli/config/config-file.html#credentials-helpers), Terraform
30will use the helper's `forget` command to remove it.
31