> For the complete documentation index, see [llms.txt](https://docs.p0.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.p0.dev/p0-cli/p0-commands-and-usage/p0-logout.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
