Instead of manually typing conda update -n envname --all
for every environment, How can I update them all at once?
Is there a better way than what I've come up with?
This is the shell script I came up with.
json
form.
jq
to access just the envs
portion of that json
."
on either end./
and taking the first piece.-y
) when prompted, and suppressing extensive output (-q
).for var in $(conda env list --json | jq '.envs[]')
do
conda update -n $(echo ${var:1:-1} | rev | cut -d'/' -f1 | rev) --all -y -q
done