> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/zhcndoc/bun/llms.txt
> Use this file to discover all available pages before exploring further.

# bun outdated

Check for outdated dependencies.

```bash theme={null}
bun outdated
```

## Behavior

`bun outdated` compares installed package versions against the latest available versions in the registry. It shows which packages have updates available.

## Output

The command displays a table with:

* **Package** - Package name and type (dev, peer, optional)
* **Current** - Currently installed version
* **Update** - Latest version matching the semver range
* **Latest** - Absolute latest version available

```bash theme={null}
$ bun outdated
bun outdated v1.0.0

┌──────────────────────────────────────────────────────────────┐
│ Package       │ Current │ Update  │ Latest  │ Type      │
├──────────────────────────────────────────────────────────────┤
│ react         │ 18.2.0  │ 18.2.1  │ 19.0.0  │           │
│ typescript    │ 5.0.0   │ 5.0.4   │ 5.3.3   │ dev       │
│ @types/node   │ 20.0.0  │ 20.10.5 │ 20.10.5 │ dev       │
└──────────────────────────────────────────────────────────────┘
```

## Filtering

### Check specific packages

```bash theme={null}
bun outdated react typescript
```

### Pattern matching

```bash theme={null}
# Check all @types/* packages
bun outdated "@types/*"

# Check all packages starting with "babel-"
bun outdated "babel-*"
```

### Check all packages

```bash theme={null}
bun outdated "*"
```

## Workspaces

In a workspace project, check outdated dependencies across all workspaces:

```bash theme={null}
bun outdated --recursive
```

Check specific workspace:

```bash theme={null}
bun outdated --filter "my-package"
```

Check multiple workspaces:

```bash theme={null}
bun outdated --filter "@myorg/*"
```

Output includes workspace information:

```
┌─────────────────────────────────────────────────────────────────────────┐
│ Package    │ Current │ Update  │ Latest  │ Workspace        │
├─────────────────────────────────────────────────────────────────────────┤
│ react      │ 18.2.0  │ 18.2.1  │ 19.0.0  │ @myorg/frontend  │
│ react      │ 18.2.0  │ 18.2.1  │ 19.0.0  │ @myorg/backend   │
└─────────────────────────────────────────────────────────────────────────┘
```

## Flags

### `--recursive` (`-r`)

Check outdated dependencies in all workspace packages.

```bash theme={null}
bun outdated --recursive
```

### `--filter <pattern>`

Check specific workspace(s).

```bash theme={null}
bun outdated --filter "packages/app"
bun outdated --filter "@myorg/*"
```

### `--cwd <path>`

Run command in specified directory.

```bash theme={null}
bun outdated --cwd ./my-project
```

### `--verbose`

Show detailed information including all available versions.

```bash theme={null}
bun outdated --verbose
```

### `--silent`

Suppress output if no packages are outdated (useful in scripts).

```bash theme={null}
bun outdated --silent
```

## Exit codes

* `0` - No outdated packages or command succeeded
* `1` - Error occurred

The command doesn't exit with a non-zero code when outdated packages are found.

## Understanding version columns

### Current

The version currently installed in `node_modules`.

### Update

The latest version that satisfies the semver range in `package.json`.

For example, if `package.json` has:

```json theme={null}
{"react": "^18.2.0"}
```

And versions available are:

* 18.2.0 (current)
* 18.2.1 (patch)
* 18.3.0 (minor)
* 19.0.0 (major)

The "Update" column shows `18.3.0` (latest that satisfies `^18.2.0`).

### Latest

The absolute latest version available in the registry, ignoring semver ranges.

## Color coding

Versions are color-coded to show update type:

* **Green** - Patch update (1.0.0 → 1.0.1)
* **Yellow** - Minor update (1.0.0 → 1.1.0)
* **Red** - Major update (1.0.0 → 2.0.0)

## Examples

### Check all dependencies

```bash theme={null}
$ bun outdated
bun outdated v1.0.0

┌────────────────────────────────────────────────────────┐
│ Package    │ Current │ Update  │ Latest  │
├────────────────────────────────────────────────────────┤
│ react      │ 18.2.0  │ 18.2.1  │ 19.0.0  │
│ typescript │ 5.0.0   │ 5.0.4   │ 5.3.3   │
└────────────────────────────────────────────────────────┘
```

### Check specific packages

```bash theme={null}
$ bun outdated react typescript
bun outdated v1.0.0

┌────────────────────────────────────────────────────────┐
│ Package    │ Current │ Update  │ Latest  │
├────────────────────────────────────────────────────────┤
│ react      │ 18.2.0  │ 18.2.1  │ 19.0.0  │
│ typescript │ 5.0.0   │ 5.0.4   │ 5.3.3   │
└────────────────────────────────────────────────────────┘
```

### Check with pattern

```bash theme={null}
$ bun outdated "@types/*"
bun outdated v1.0.0

┌──────────────────────────────────────────────────────────┐
│ Package      │ Current │ Update  │ Latest  │
├──────────────────────────────────────────────────────────┤
│ @types/node  │ 20.0.0  │ 20.10.5 │ 20.10.5 │
│ @types/react │ 18.0.0  │ 18.2.45 │ 18.2.45 │
└──────────────────────────────────────────────────────────┘
```

### No outdated packages

```bash theme={null}
$ bun outdated
bun outdated v1.0.0

# No output - all packages are up to date
```

## Updating packages

After checking for outdated packages, update them:

```bash theme={null}
# Update to latest compatible versions (respects semver ranges)
bun update

# Update to absolute latest versions (ignores semver ranges)
bun update --latest

# Update specific packages
bun update react typescript

# Interactive update
bun update --interactive
```

See [bun update](/cli/update) for details.

## CI/CD usage

Check for outdated dependencies in CI:

```bash theme={null}
# Exit successfully even if packages are outdated
bun outdated

# To fail CI if packages are outdated, manually check output
if bun outdated | grep -q "│"; then
  echo "Outdated packages found"
  exit 1
fi
```

## Performance

`bun outdated` is fast because:

* It reads from Bun's package manifest cache
* It queries registries in parallel
* It reuses lockfile information when possible

Typical check time for 100+ packages: **\< 2 seconds**
