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

# capy logout: End Session and Clear Cached Keys

> End your Capy session and clear cached project keys. Master keys at ~/.capy/orgs/ survive logout — encrypted at rest. Delete ~/.capy/ for a full wipe.

## Synopsis

```bash theme={null}
capy logout
```

## Description

Clears your local session: the refresh token, cached project keys, and any per-user session files in `~/.capy/auth/`.

**Master keys survive logout.** The double-wrapped `key.enc` files in `~/.capy/orgs/{orgId}/users/{userId}/` remain on disk - they're already encrypted at rest, and you need them to log back in without re-redeeming every invite. To fully wipe Capy from a machine, also delete `~/.capy/`.

## Example

```bash theme={null}
$ capy logout
Logged out. Session cleared.
```

If there's no active session:

```bash theme={null}
$ capy logout
No active session.
```

## See also

* [`capy cleanup`](/cli/cleanup) - remove git hooks from the current project
