Skip to content

Instantly share code, notes, and snippets.

@lfir
Created April 21, 2018 22:33
Show Gist options
  • Save lfir/a20d5df1beb6e391cf1a99b7f47a70ee to your computer and use it in GitHub Desktop.
Save lfir/a20d5df1beb6e391cf1a99b7f47a70ee to your computer and use it in GitHub Desktop.
update all conda venvs/prefixes
#!/bin/bash
#tested with conda 4.5.0
envs_dir=$(conda config --show | grep -A 1 envs_dirs | grep -oE '/.+$')
find "$envs_dir" -mindepth 1 -maxdepth 1 -type d -exec conda update --all --prefix {} \;
#alternative method
#cd "$envs_dir" || exit
#for env in *; do
# [ -e "$env" ] || continue
# env_path="$envs_dir"/"$env"
# conda update --all --prefix "$env_path"
#done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment