How to unpin pinned package in conda/mamba
Question:
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.
Answers:
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.
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.
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.