#7081·pixi

chore(lock): `--check` should imply `--dry-run`

Author: T045TCreated Sep 22, 2026Updated Oct 1, 2026
Labelscliarea:lock

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

bash
$ git clone git clone https://github.com/prefix-dev/roscon-2026-declarative-ros-workspaces-with-pixi.git roscon_workshop
$ cd roscon_workshop/03-collaboration
$ rm pixi.lock || true  # pixi.lock shouldn't be there, but remove if it is
$ pixi lock --check

# SNIP
# This is expected, pixi.lock is missing
Error:   × lock file not up-to-date with the workspace

$ pixi lock --check
✔ Lock-file was already up-to-date

# This is **unexpected**! pixi.lock should still not be there!

$ rm pixi.lock
$ pixi lock --check --dry-run
# SNIP
Error:   × lock file not up-to-date with the workspace

$ pixi lock --check --dry-run
# SNIP
# This is as expected: pixi.lock still isn't there
Error:   × lock file not up-to-date with the workspace

Expected:

pixi.toml/pyproject.toml file that reproduces my issue: https://github.com/prefix-dev/roscon-2026-declarative-ros-workspaces-with-pixi/blob/main/exercises/03-collaboration/pixi.toml pixi info output:

pixi info
System
------------
       Pixi version: 0.81.0
        TLS backend: rustls
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=7.1.6=0
                   : __glibc=2.43=0
                   : __archspec=1=zen2
          Cache dir: /home/t045t/.cache/rattler/cache
       Auth storage: /home/t045t/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/t045t/.pixi/bin
    Environment dir: /home/t045t/.pixi/envs
       Manifest dir: /home/t045t/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: ros-demo-team
      Manifest file: /home/t045t/roscon/roscon-2026-declarative-ros-workspaces-with-pixi/exercises/03-collaboration/pixi.toml

Environments
------------
        Environment: default
           Features: default
           Channels: https://prefix.dev/robostack-lyrical, conda-forge
   Dependency count: 3
       Dependencies: ros-lyrical-demo-nodes-cpp, ros-lyrical-ros2run, ros-lyrical-ros2topic
   Target platforms: linux-64, linux-aarch64, osx-arm64-macos-14-0 (macos=14.0), osx-64-macos-14-0 (macos=14.0), win-64
  Resolved platform: linux-64 (archspec=x86_64, glibc=2.28, linux=4.18, __unix)
   Minimum platform: linux-64 (__glibc >=2.17,<3.0.a0, __glibc >=2.28,<3.0.a0, __unix)
    Prefix location: /home/t045t/roscon/roscon-2026-declarative-ros-workspaces-with-pixi/exercises/03-collaboration/.pixi/envs/default
              Tasks: test, listener, talker

Issue description

No response

Expected behavior

(probably in conflict with the letter, if not the intent, of https://github.com/prefix-dev/pixi/issues/5370)

pixi lock --check creates the lock file, and then checks if the lock file changed. This is in line with pixi lock --help, but a bit unexpected. My intuition was that pixi lock --check aborts when it detects an out-of-date lock file, without updating it. (Maybe even an early abort for missing pixi.lock, where it skips the solve).

Combining --check with --dry-run behaves as I expect --check to on its own, see the example.