Skip to content

Unexpected dependency upgrades when downgrading a single package with uv add #16527

@JuanCruzC97

Description

@JuanCruzC97

Question

I ran into a situation where downgrading one dependency caused many other packages to update unexpectedly.

My project depends tightly on the darts library. I initially added it using:

uv add u8darts[all]

This created a requirement like u8darts[all]>=0.37.1 in my pyproject.toml.

At some point, darts was updated to version 0.38.0 (not sure when it happened), which introduced breaking changes. To fix this, I tried downgrading with:

uv add u8darts[all]==0.37.1

However, uv then upgraded many other dependencies in the environment, even though I was only trying to downgrade this one package.

Image

Questions:

Why does uv trigger many package upgrades when downgrading a single dependency? Probably this is the cause for darts being upgraded to 0.38.0 in the first place. How can I avoid this?

What’s the recommended workflow for pinning or downgrading a dependency like this without affecting unrelated packages?

What am I missing or doing wrong here? What’s the best setup or workflow for this kind of use case?

Platform

Windows 11

Version

uv 0.6.11 (0632e24 2025-03-30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions