def remove(cluster_name: str, group: Optional[int], fmt: str) -> None:
    """Process ``remove`` command of ``patronictl`` utility.

    Remove cluster *cluster_name* from the DCS.

    :param cluster_name: name of the cluster which information will be wiped out of the DCS.
    :param group: which Citus group should have its information wiped out of the DCS. Refer to the module note for more
        details.
    :param fmt: the output table printing format. See :func:`print_output` for available options.

    :raises:
        :class:`PatroniCtlException`: if:
            * Patroni is running on a Citus cluster, but no *group* was specified; or
            * *cluster_name* does not exist; or
            * user did not type the expected confirmation message when prompted for confirmation; or
            * use did not type the correct leader name when requesting removal of a healthy cluster.

    """
    dcs = get_dcs(cluster_name, group)
    cluster = dcs.get_cluster()

    if is_citus_cluster() and group is None:
        raise PatroniCtlException('For Citus clusters the --group must me specified')
    output_members(cluster, cluster_name, fmt=fmt)

    confirm = click.prompt('Please confirm the cluster name to remove', type=str)
    if confirm != cluster_name:
        raise PatroniCtlException('Cluster names specified do not match')

    message = 'Yes I am aware'
    confirm = \
        click.prompt('You are about to remove all information in DCS for {0}, please type: "{1}"'.format(cluster_name,
                     message), type=str)
    if message != confirm:
        raise PatroniCtlException('You did not exactly type "{0}"'.format(message))

    if cluster.leader and cluster.leader.name:
        confirm = click.prompt('This cluster currently is healthy. Please specify the leader name to continue')
        if confirm != cluster.leader.name:
            raise PatroniCtlException('You did not specify the current leader of the cluster')

    dcs.delete_cluster()
Process ``remove`` command of ``patronictl`` utility.

    Remove cluster *cluster_name* from the DCS.

    :param cluster_name: name of the cluster which information will be wiped out of the DCS.
    :param group: which Citus group should have its information wiped out of the DCS. Refer to the module note for more
        details.
    :param fmt: the output table printing format. See :func:`print_output` for available options.

    :raises:
        :class:`PatroniCtlException`: if:
            * Patroni is running on a Citus cluster, but no *group* was specified; or
            * *cluster_name* does not exist; or
            * user did not type the expected confirmation message when prompted for confirmation; or
            * use did not type the correct leader name when requesting removal of a healthy cluster.

    
patroni/ctl.py