Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pages/common/poetry-remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# poetry remove

> Remove a dependency from a Poetry project.
> More information: <https://python-poetry.org/docs/cli/#remove>.

- Remove a package from dependencies:

`poetry remove {{package_name}}`

- Remove a development dependency:

`poetry remove --group {{dev}} {{package_name}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry remove --group {{dev}} {{package_name}}`
`poetry remove {{[-D|--dev]}} {{package_name}}`

--dev (-D): Removes a package from the development dependencies. (shortcut for -G dev)

Could you add an example for any group? So something like:
poetry remove --group {{group_name}} {{package_name}}


- Remove multiple packages:

`poetry remove {{package1}} {{package2}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`poetry remove {{package1}} {{package2}}`
`poetry remove {{package1 package2 ...}}`

https://github.com/tldr-pages/tldr/blob/main/contributing-guides/style-guide.md#grouping-placeholders


- Remove a package without updating the lock file:

`poetry remove {{package_name}} --lock`

- Remove a package in dry-run mode (show what would be removed):

`poetry remove {{package_name}} --dry-run`

- Display help:

`poetry remove --help`