---8<--- [start:description]

--8<-- [end:description]

---8<--- [start:example]

## Examples

```shell
pixi lock
pixi lock --manifest-path ~/myworkspace/pixi.toml
pixi lock --json
pixi lock --check
pixi lock --with-constraint 'openssl>=3.5.4' # (1)!
pixi lock --check --with-constraint 'openssl>=3.5.4' # (2)!
pixi lock --with-pypi-constraint 'urllib3>=2.5.0' # (3)!
```

1. Re-lock only the environments whose locked `openssl` is older than `3.5.4`, keeping all other locked packages as preferences. The constraint is not written to the manifest.
2. Exit with a non-zero code if any environment has a locked `openssl` older than `3.5.4`.
3. Like `--with-constraint`, but for the PyPI package `urllib3`. The constraint is a PEP 508 requirement, optionally with environment markers.

--8<-- [end:example]
