How to delete a keychain reference from command line
<p>From the Keychain app I have the option to delete just the <strong>reference</strong> to a listed Keychain that was unlocked and listed via command line.
<a href="https://i.stack.imgur.com/pBBQb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pBBQb.png" alt="Keychain app" /></a>
But from the command line (<em>man security</em>) I don't seem to have this option but to delete the <strong>file + reference</strong> to this keychain.</p>
<p><a href="https://i.stack.imgur.com/4UfEK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4UfEK.png" alt="security command man" /></a></p>
<p>How can I just remove a reference to a keychain I unlocked previously from the command line? I want to clean up and remove (unlist?) the keychain again after I performed some operations with it (because it remains visible in the Keychain app if not deleted).</p>