Create a gist now

Instantly share code, notes, and snippets.

anonymous /clean_all_lxd.sh
Created Sep 14, 2016

What would you like to do?
#!/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