Skip to content

Instantly share code, notes, and snippets.

@atgmello
Created March 22, 2020 14:34
Show Gist options
  • Save atgmello/ff1fe134d30b5d528347a26a36af7c89 to your computer and use it in GitHub Desktop.
Save atgmello/ff1fe134d30b5d528347a26a36af7c89 to your computer and use it in GitHub Desktop.
Conda env removal automation for the DS4A LATAM 2020 course cases.
#!/bin/sh
cd $1
for D in *; do
if [ -d "${D}" ]; then
echo "Now working at"
echo "${D}"
echo "..."
cd ${D}
# Grab correct environment name
ds4a_env_name=$(grep "name" osx_env.yml | awk '{print $2}')
# Remove the right environment
echo "Removing ${ds4a_env_name}"
echo "..."
conda remove --name ${ds4a_env_name} --all --yes
echo "Done!"
echo ""
cd ..
fi
done
echo ""
echo "All done!"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment