---
title: "oz0 plugin gc"
description: "Usage and flags for oz0 plugin gc."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/plugin/gc"
---
# oz0 plugin gc

> Usage and flags for oz0 plugin gc.

For: Operators and developers looking up a command.

Delete the stored plugin artifacts that no installed version or its candidate, no plugin rollout whose queues may still run jobs, and no retained job references, once they are older than the grace period (7 days by default). The manager role does this every hour by itself (server start --artifact-gc); this runs one pass now. With --dry-run it lists what a pass would delete and deletes nothing. Cluster admins only.

## Usage

```bash
oz0 plugin gc [flags]
```

## Flags

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

<tbody>
  <tr>
    <td>
      <code>
        --dry-run
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      list what a pass would delete, and delete nothing
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --grace
      </code>
    </td>
    
    <td>
      duration
    </td>
    
    <td>
      <code>
        168h
      </code>
    </td>
    
    <td>
      how old an unreferenced artifact must be
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </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.
