diff --git a/docs/managing-dependencies.md b/docs/managing-dependencies.md index 995bb823700..c1fa129674c 100644 --- a/docs/managing-dependencies.md +++ b/docs/managing-dependencies.md @@ -197,7 +197,7 @@ poetry install --sync ``` The `--sync` option can be combined with any [dependency groups]({{< relref "#dependency-groups" >}}) related options -to synchronize the environment with specific groups. Note that extras are separate. Any +to synchronize the environment with specific groups. Note that extras are separate. Any extras not selected for install are always removed, regardless of `--sync`. ```bash @@ -212,6 +212,6 @@ The `--sync` option replaces the `--remove-untracked` option which is now deprec ## Layering optional groups -When you omit the `--sync` option, you can install any subset of optional groups without removing +When you omit the `--sync` option, you can install any subset of optional groups without removing those that are already installed. This is very useful, for example, in multi-stage Docker builds, where you run `poetry install` multiple times in different build stages. diff --git a/docs/pyproject.md b/docs/pyproject.md index ba9d785c949..55004615ccb 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -385,8 +385,8 @@ poetry install --extras "mysql pgsql" poetry install -E mysql -E pgsql ``` -Any extras you don't specify will be removed. Note this behavior is different from -[optional dependency groups]({{< relref "managing-dependencies#optional-groups" >}}) not +Any extras you don't specify will be removed. Note this behavior is different from +[optional dependency groups]({{< relref "managing-dependencies#optional-groups" >}}) not selected for install, e.g. those not specified via `install --with`. You can install all extras with the `--all-extras` option: