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

# ocx update

> Reference for the ocx update command — update installed components from registries

## Usage

```bash theme={null}
ocx update [components...] [options]
```

## Description

Update installed components from their registries to the latest version. You can update specific components, all components, or all components from a particular registry.

## Arguments

| Argument        | Required | Description                                                         |
| --------------- | -------- | ------------------------------------------------------------------- |
| `components...` | No       | Specific components to update (omit to use `--all` or `--registry`) |

## Flags

| Flag                | Shorthand | Default           | Description                                    |
| ------------------- | --------- | ----------------- | ---------------------------------------------- |
| `--all`             |           | `false`           | Update all installed components                |
| `--registry <name>` |           |                   | Update all components from a specific registry |
| `--dry-run`         |           | `false`           | Preview changes without applying               |
| `--cwd <path>`      |           | Current directory | Working directory                              |
| `--quiet`           | `-q`      | `false`           | Suppress output                                |
| `--verbose`         | `-v`      | `false`           | Verbose output                                 |
| `--json`            |           | `false`           | Output as JSON                                 |

## Mutual Exclusivity

These flag combinations are not allowed:

* `--all` with component names
* `--registry` with component names
* `--all` with `--registry`

## Examples

### Update a Specific Component

```bash theme={null}
ocx update shadcn/button
```

### Update All Components

```bash theme={null}
ocx update --all
```

### Update All Components from a Registry

```bash theme={null}
ocx update --registry shadcn
```

### Preview Updates

```bash theme={null}
ocx update --all --dry-run
```

## See Also

* [ocx add](/docs/cli/add) — Add new components.
* [ocx remove](/docs/cli/remove) — Remove components.
* [CLI Reference](/docs/cli/commands) — All commands.
