Skip to content

Instantly share code, notes, and snippets.

@jazzsequence
Last active August 25, 2022 20:41
Show Gist options
  • Save jazzsequence/26f3de59d1317eab15f234ccd4bb96e0 to your computer and use it in GitHub Desktop.
Save jazzsequence/26f3de59d1317eab15f234ccd4bb96e0 to your computer and use it in GitHub Desktop.
Delete a bunch of Pantheon multidevs
# This assumes all of your multidevs are named similarly, e.g. dev-1, dev-2, dev-3, etc. By default, Pantheon only allows
# 10 concurrent multidevs, so if you're making a lot for debugging purposes, you might want to clear them all out in one
# go so you can create more. All of this could be done in a single line of bash if you really wanted to; it's broken out
# here for readability, but you could do something like this instead of what follows:
#
# for i in {1..10}; do; terminus multidev:delete site-name.site-prefix-$i --yes; done;
#
# Uncomment the following lines with your site name and multidev-prefix.
# Again, your multidevs MUST be named with the same prefix or this script won't work!
# $SITE_NAME=your-site-name
# $PREFIX=your-prefix-
for i in {1..10}
do
terminus multidev:delete $SITE_NAME.$PREFIX-$i --yes
done
@pwtyler
Copy link

pwtyler commented Aug 25, 2022

# Nuke all multidevs and salt the earth
for ENV in $(terminus multidev:list --field Name -- ${SITE_NAME})
do
  terminus multidev:delete --delete-branch ${SITE_NAME}.${ENV} --yes
done

@jazzsequence
Copy link
Author

@pwtyler That works, too 💣 💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment