Skip to content

Instantly share code, notes, and snippets.

Created September 14, 2016 11:25
Show Gist options
  • Save anonymous/9eabdf74bf72fa26287aaed18e281140 to your computer and use it in GitHub Desktop.
Save anonymous/9eabdf74bf72fa26287aaed18e281140 to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
RUNNING_CONTAINERS="$(lxc list -c n | grep -i juju |sed 's/|//g')"
for container in $RUNNING_CONTAINERS; do
echo "Stopping $container"
lxc stop $container
echo "Deleting $container"
lxc delete $container
done
rm -rf .local .cache .config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment