Skip to content

Instantly share code, notes, and snippets.

@cescoffier
Last active November 22, 2017 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cescoffier/a6f5202d53d91eba65df6f7922c39d9a to your computer and use it in GitHub Desktop.
Save cescoffier/a6f5202d53d91eba65df6f7922c39d9a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
PROJECT=$(./oc project -q)
echo "Cleaning up current project: ${PROJECT}"
# https://docs.openshift.org/latest/cli_reference/basic_cli_operations.html#object-types
./oc delete build --all
./oc delete bc --all
./oc delete dc --all
./oc delete deploy --all
./oc delete is --all
./oc delete istag --all
./oc delete isimage --all
./oc delete job --all
./oc delete po --all
./oc delete rc --all
./oc delete rs --all
./oc delete secrets --all
./oc delete configmap --all
./oc delete services --all
./oc delete routes --all
./oc delete template --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment