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

# jnc reinstall

> Re-install an environment with optional package filtering.

# jnc reinstall

Re-installs an environment, forcing a fresh installation of packages. If specific packages are named, only those packages are reinstalled. Otherwise, the entire environment is reinstalled from scratch.

If the lock file is not up-to-date with the manifest, it will be updated first.

By default, only the `default` environment is reinstalled. Use `--environment` to target a specific environment, or `--all` to reinstall every environment in the workspace.

## Usage

```bash theme={null}
jnc reinstall [OPTIONS] [PACKAGE]...
```

## Arguments

| Argument  | Description                                                                                |
| --------- | ------------------------------------------------------------------------------------------ |
| `PACKAGE` | One or more package names to reinstall. If omitted, the entire environment is reinstalled. |

## Options

| Option                      | Description                                                                              |
| --------------------------- | ---------------------------------------------------------------------------------------- |
| `-e`, `--environment <ENV>` | The environment(s) to reinstall. Can be specified multiple times. Defaults to `default`. |
| `-a`, `--all`               | Reinstall all environments. Conflicts with `--environment`.                              |
| `--frozen`                  | Use the lockfile as-is, do not update it even if the manifest has changed.               |
| `--locked`                  | Require the lockfile to be up-to-date with the manifest, abort if not.                   |

### Global Options

| Option                         | Description                                                       |
| ------------------------------ | ----------------------------------------------------------------- |
| `-m`, `--manifest-path <PATH>` | Path to `jnc.toml`, `pyproject.toml`, or the workspace directory. |

## Examples

### Reinstall the entire default environment

```bash theme={null}
jnc reinstall
```

### Reinstall specific packages

```bash theme={null}
jnc reinstall numpy scipy
```

### Reinstall a specific environment

```bash theme={null}
jnc reinstall --environment test
```

### Reinstall all environments

```bash theme={null}
jnc reinstall --all
```

### Reinstall without updating the lock file

```bash theme={null}
jnc reinstall --frozen
```
