You can use repmgr on a running node on your cluster to unregister a failed or unreachable standby node.
Note: For the primary node to function normally, at least one standby node must always be running.
Prerequisites
To unregister a standby node that is not running, you must provide the node ID. See Check the Connectivity Status of a Database High Availability Cluster.