<p>what is the command to remove all objects using kubectl for a specific environment? </p>

<p>kubectl -n squad-mb get all</p>

<p>returns all environments for example, and in order to delete one environment I would like to know how to see it, and which command would be required to delete the specific environment (i.e. develop)</p>

<p>To delete all resources of a given namespaces use:</p>

<pre><code>kubectl delete all --all -n {my-namespace}
</code></pre>

<p>Explanation:</p>

<ul>
<li>Usage: <code>kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) [options]</code></li>
<li><strong>all</strong>: all resources types. If you want to delete only some resources you can do <code>kubectl delete deployments,pods,replicasets,services --all</code></li>
<li><strong>--all</strong>: delete all resources of a type (or all types if using <em>all</em>). Example: <code>kubectl delete pods --all</code></li>
<li><strong>-n</strong>: selects the desired namespace. If empty the command is valid for the <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#setting-the-namespace-preference" rel="noreferrer">default namespace of your context</a>. You can select all namespaces with <em>--all-namespaces</em></li>
</ul>
