<p>After creating a new app using <code>oc new-app location/nameofapp</code>, many things are created: a deploymentConfig, an imagestream, a service, etc. I know you can run <code>oc delete &lt;label&gt;</code>. I would like to know how to delete all of these given the label.</p>

<p>When using <code>oc new-app</code>, it would normally add a label on each resource created call <code>app</code> with value being the name given to the application. That name would be based on the name of the git repository, or could have been supplied using the <code>--name</code> option. Knowing that to delete everything you can then run:</p>

<pre><code>oc delete all --selector app=appname
</code></pre>

<p>Before you delete anything you should be able to check what would matche by running:</p>

<pre><code>oc get all --selector app=appname
</code></pre>

<p>Note that if creating from a template, rather than a repository, how things are labelled can depend on what the template itself sets up, so the instructions above may not apply.</p>
