Removes a public key from the keyring.

    Does nothing if a key is already not in the keyring. If none is specified - clears the keyring.
    To force the cocaine-runtime to refresh its keyring, call `refresh` method.

def keyring_remove(key, yes, **kwargs):
    """
    Removes a public key from the keyring.

    Does nothing if a key is already not in the keyring. If none is specified - clears the keyring.
    To force the cocaine-runtime to refresh its keyring, call `refresh` method.
    """
    if key is None:
        if not yes:
            click.confirm('Are you sure you want to remove all keys?', abort=True)

    ctx = Context(**kwargs)
    ctx.execute_action('keyring:remove', **{
        'key': key,
        'storage': ctx.repo.create_secure_service('storage'),
    })