---
title: "oz0 retention"
description: "Retention is set per tenant: after it, the retention job deletes the tenant's audit entries, job summaries, usage rows and payloads."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/retention"
---
# oz0 retention

> Retention is set per tenant: after it, the retention job deletes the tenant's audit entries, job summaries, usage rows and payloads.

For: Operators and developers looking up a command.

Retention is set per tenant: after it, the retention job deletes the tenant's audit entries, job summaries, usage rows and payloads. An agent marked high-risk in the inventory keeps its entries at least 184 days (six months); younger entries of other agents lose their content instead. A legal hold stops retention and erasure for the tenant until it is lifted.

## Usage

```bash
oz0 retention [command]
```

## Subcommands

- [`held`](https://docs.oz0.ai/reference/cli/oz0/retention/held)
- [`hold`](https://docs.oz0.ai/reference/cli/oz0/retention/hold)
- [`keep-for`](https://docs.oz0.ai/reference/cli/oz0/retention/keep-for)
- [`release`](https://docs.oz0.ai/reference/cli/oz0/retention/release)
- [`set`](https://docs.oz0.ai/reference/cli/oz0/retention/set)
- [`show`](https://docs.oz0.ai/reference/cli/oz0/retention/show)

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --tenant
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
    
    <td>
      the tenant
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
