Uninstalling the cluster

Use these steps to uninstall your HA cluster setup.

Before you begin

Stop all the services before you uninstall.

Procedure

  1. Uninstall PostgreSQL.
    1. Find the postgresql12 packages with the following command:
      rpm -qa | grep -i postgresql12
      You can see three packages:
      • postgresql11-server-11.5-1PGDG.rhel7.x86_64.rpm
      • postgresql11-libs-11.5-1PGDG.rhel7.x86_64.rpm
      • postgresql11-11.5-1PGDG.rhel7.x86_64.rpm
    2. Uninstall each package with the following command:
      rpm -e <PACKAGE_NAME>
  2. Uninstall Patroni.

    Use the pip to uninstall the Python packages related to Patroni.

    
    pip uninstall setuptools
    pip uninstall psycopg2-binary
    pip uninstall patroni
    pip uninstall python-etcd
    
  3. Uninstall etcd.

    Remove the etcd binary files with the following commands:

    
    rm -rf etcd etcdctl
    rm -rf /var/lib/etcd
    rm -rf /etc/etcd
    
  4. Uninstall HAProxy.
    1. Find the HAProxy 1.5.18 package with the following command:
      rpm -qa | grep -i haproxy-1.5.18

      You can see the haproxy-1.5.18-9.el7.x86_64.rpm file.

    2. Uninstall each package with the following command:
      rpm -e haproxy-1.5.18-9.el7.x86_64