Skip to content

Instantly share code, notes, and snippets.

@tsabat
Last active December 27, 2015 00:09
Show Gist options
  • Save tsabat/7235963 to your computer and use it in GitHub Desktop.
Save tsabat/7235963 to your computer and use it in GitHub Desktop.
Chef Delete Unused Nodes
knife node list  | \ 
grep app_ | \ 
grep "app_ec2-54-212-236-68.us-west-2\|app_ec2-54-202-44-36.us-west-2" -v | \
while read -r line ; do knife node delete $line -y; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment