title: Example for Mac OS X security delete-certificate -c <name>?
body: <p><strong>Short version: Please provide an example for <code>security delete-certificate -c &lt;name&gt;</code></strong> ...  (I tried <code>security delete-certificate -c "Foo Certification Authority"</code> and I tried wild cards.)</p>
  
  <p>Long version: </p>
  
  <p>What I'm trying to do: replace or overwrite an existing certificate.</p>
  
  <p>Can someone provide an example of using <code>security</code> to get the "name" of a certificate and then using <code>security delete-certificate -c &lt;name&gt;</code> to delete it? I've tried a few things for <code>&lt;name&gt;</code> but haven't yet been able to give it something that matches the certificate that I want to remove.</p>
  
  <p>Alternatively, if I use <code>security add-trusted-cert -d -r trustRoot -k &lt;keychain&gt;  &lt;certificate&gt;</code> will that simply overwrite any existing certificate with the same name? If this is the case, then I guess I won't need to know how to delete the old one by name.</p>
  
  <p>(I prefer dealing with the name instead of the SHA because it makes things more human-readable)</p>