This CF CLI Plugin allows users to search through and delete their applications using wildcards. It is useful for users who have multiple apps to manage in their spaces.
#Requirements To prevent your shell from expanding the wildcard before the plugin sees it, wildcards should be escaped using a preceding '\'.
$ cf wc-d app\* $ cf wc-a app\?
Install from CLI (v.6.10.0 and up)
$ cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/ $ cf install-plugin wildcard_plugin -r CF-Community
Install from Source
$ go get github.com/cloudfoundry/cli $ go get github.com/jeaniejung/Wildcard_Plugin $ cd $GOPATH/src/github.com/jeaniejung/Wildcard_Plugin $ go build *.go $ cf install-plugin wildcard_plugin
$ cf wildcard-apps APP_NAME_WITH_WILDCARD
$ cf wildcard-delete APP_NAME_WITH_WILDCARD [-f -r]
$ cf uninstall-plugin wildcard
Commands for wildcard-apps, wc-a
||List all apps in the target space matching the wildcard pattern|
Commands for wildcard-delete, wc-d
||Displays list of matched apps and prompts the user for interactive deletion or force deletion of all matched apps|
||Displays list of matched apps and prompts the user for interactive deletion or force deletion of all matched apps and their routes|
||Force deletion of all apps in the target space matching the wildcard pattern without confirmation|
||Force deletion of all apps and their mapped routes in the target space matching the wildcard pattern without confirmation|