@@ -163,24 +163,24 @@ Poetry supports what's called dependency synchronization. Dependency synchroniza
163163that the locked dependencies in the ` poetry.lock ` file are the only ones present
164164in the environment, removing anything that's not necessary.
165165
166- This is done by using the ` -- sync` option of the ` install ` command:
166+ This is done by using the ` sync ` command:
167167
168168``` bash
169- poetry install -- sync
169+ poetry sync
170170```
171171
172- The ` -- sync` option can be combined with any [ dependency groups] ({{< relref "#dependency-groups" >}}) related options
173- to synchronize the environment with specific groups. Note that extras are separate. Any
174- extras not selected for install are always removed, regardless of ` --sync ` .
172+ The ` sync ` command can be combined with any [ dependency groups] ({{< relref "#dependency-groups" >}}) related options
173+ to synchronize the environment with specific groups. Note that extras are separate.
174+ Any extras not selected for install are always removed.
175175
176176``` bash
177- poetry install --without dev --sync
178- poetry install --with docs --sync
179- poetry install --only dev
177+ poetry sync --without dev
178+ poetry sync --with docs
179+ poetry sync --only dev
180180```
181181
182182## Layering optional groups
183183
184- When you omit the ` --sync ` option, you can install any subset of optional groups without removing
184+ When you using ` install ` command without the ` --sync ` option, you can install any subset of optional groups without removing
185185those that are already installed. This is very useful, for example, in multi-stage
186186Docker builds, where you run ` poetry install ` multiple times in different build stages.
0 commit comments