5

I have a conda environment that has a package pinned as follows:

Pinned packages:
  - python 3.8.*
  - bcbio-gff 0.6.7.*
  - snakemake 6.7.0.*

How do I remove the pin for one of the pinned packages, just using command line conda / mamba?

I've tried conda update snakemake but that doesn't remove the pin.

I can change the pin easily, e.g. by conda install snakemake=7, but then I have snakemake still pinned. I want to unpin snakemake entirely.

I had a look at potentially similar questions, but none seemed to answer my question.

Cornelius Roemer
  • 3,772
  • 1
  • 24
  • 55
  • 1
    Last I knew Conda doesn't provide a CLI for pinning, so why would there be one for unpinning? This would be more appropriate as a feature request rather than an SO question. – merv Apr 05 '22 at 22:02

1 Answers1

3

This is only a suboptimal answer, but it's the best I could find so far:

You need to manually remove the pinned package from a config file called pinned which you can find in

CONDA_PATH/base/envs/ENV_NAME/conda-meta/pinned

In my case I had to do:

vim /usr/local/Caskroom/mambaforge/base/envs/nextstrain/conda-meta/pinned

And remove the line:

snakemake=6.7.0

It would be much nicer if there was a conda CLI command - but it doesn't seem to exist.

Cornelius Roemer
  • 3,772
  • 1
  • 24
  • 55