Skip to main content

Command: logout

The tofu logout command is used to remove credentials stored by tofu login. These credentials are API tokens for any host that offers OpenTofu-compatible services.


Usage: tofu logout [hostname]

Credentials Storage

By default, OpenTofu will remove the token stored in plain text in a local CLI configuration file called credentials.tfrc.json. If you have configured a credentials helper program, OpenTofu will use the helper's forget command to remove it.