This might be doable by ordering the explicitly installed packages (pinned or root) earlier in the list given to opam-0install-cudf. This would require to **not** merge https://github.com/ocaml/opam/pull/6531 Related to #6586