# shrink\_worktrees

Queue worktrees to be shrunk in the background.

writes · idempotent · destructive · CLI only · [Worktree](https://komrad.dev/latest/api/worktree.md)

Shrinking deletes the gitignored dependency and build directories that sit beside the file that rebuilds them. Komrad shrinks only the worktrees of archived tasks, and leaves every other worktree alone.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.worktree.v1.WorktreeService/ShrinkWorktrees \
  -H 'Content-Type: application/json' \
  -d '{
  "dirs": [
    "<dirs>"
  ]
}'
```

```bash
komrad rpc shrink-worktrees \
  --dirs '<string>'
```

## Request

### ShrinkWorktreesRequest

| Field | Type | Description |
| --- | --- | --- |
| [`dirs`](https://komrad.dev/latest/api/worktree/shrink-worktrees.md#komrad-worktree-v1-ShrinkWorktreesRequest-dirs) | string\[\]\* no repeats each not empty | The worktrees to shrink, by the paths [`list_worktrees`](https://komrad.dev/latest/api/worktree/list-worktrees.md) returns. |

## Response

### Empty

No fields.
