# p0 logout

### **Overview** <a href="#overview" id="overview"></a>

The `p0 logout` command removes all P0 CLI credentials, configuration files, and cached data from your local environment. This helps ensure that no sensitive information remains after you are finished using the CLI.

When you run `p0 logout`, the CLI will:

* Delete your saved identity file (authentication token)
* Remove all locally stored P0 configuration files
* Clean up any CLI caches related to your P0 session

### Usage <a href="#usage" id="usage"></a>

```shell
p0 logout
```

No additional arguments are required. After running this command, you will need to log in again with `p0 login` before using other P0 CLI commands.

### **What Files Are Removed** <a href="#what-files-are-removed" id="what-files-are-removed"></a>

| File Location         | Purpose                       |
| --------------------- | ----------------------------- |
| `~/.p0/identity.json` | Authentication token and info |
| `~/.p0/config.json`   | CLI configuration             |
| CLI cache files       | Session/cache data            |

If you use multiple organizations or custom configuration paths, `p0 logout` will remove the relevant files for your current context.

### Notes <a href="#notes" id="notes"></a>

* Use `p0 logout` on shared systems, CI environments, or when rotating credentials to ensure proper cleanup.
* Attempting to use privileged CLI commands after logout requires you to authenticate again with `p0 login`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.p0.dev/p0-cli/p0-commands-and-usage/p0-logout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
