← 返回命令列表

Linux command

poetry-update 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Update all dependencies

poetry update

Update specific packages

poetry update [package1] [package2]

Preview updates without installing

poetry update --dry-run

Update without dev dependencies

poetry update --without dev

Only update the lock file, don't install

poetry update --lock

说明

poetry update resolves dependencies to their latest versions allowed by the constraints in pyproject.toml, updates the poetry.lock file, and installs the new versions. When specific packages are given, only those packages and their dependencies are updated. Without arguments, all dependencies are updated.

参数

--dry-run
Preview updates without installing.
--no-dev
Skip dev dependencies (deprecated, use --without dev).
--with _groups_
Include optional dependency groups.
--without _groups_
Exclude dependency groups.
--only _groups_
Only update the specified dependency groups.
--lock
Only update the lock file, don't install packages.
--sync
Synchronize the environment by removing packages not in the lock file.
-v, -vv, -vvv
Increase verbosity.

FAQ

What is the poetry-update command used for?

poetry update resolves dependencies to their latest versions allowed by the constraints in pyproject.toml, updates the poetry.lock file, and installs the new versions. When specific packages are given, only those packages and their dependencies are updated. Without arguments, all dependencies are updated.

How do I run a basic poetry-update example?

Run `poetry update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --dry-run do in poetry-update?

Preview updates without installing.