Contact Free trial Login

Uninstall Anypoint Platform Private Cloud

If you encounter problems during installation, you can uninstall. Before beginning a new installation, ensure that your environment meets all system requirements listed in the Product Prerequisites, and that all remnants of the original installation have been removed by performing the following commands on all nodes:

  1. Uninstall Gravity

    # The order of the following steps is important!
    # Perform each step in order as described.
    
    # Remove installed system components.
    sudo gravity system uninstall --confirm
    
    # Unmount all Anypoint mounts.
    sudo umount /var/lib/gravity/planet/etcd
    sudo umount /var/lib/gravity
    sudo umount /var/lib/data
    
    # Remount and clear platform data.
    sudo mount /var/lib/gravity
    sudo rm -rf /var/lib/gravity/*
    
    # Remount and clear platform data.
    sudo mkdir -p /var/lib/gravity/planet/etcd
    sudo mount /var/lib/gravity/planet/etcd
    sudo rm -rf /var/lib/gravity/planet/etcd/*
    
    # Remount and clear application data.
    sudo mount /var/lib/data
    sudo rm -rf /var/lib/data/*
  2. Restore Original State of the Docker Volume

    # In order to clean the Docker volumes, you might need to first reboot the server
    # to force clean down any handles to the Docker Device.
    # This allows you to perform the proper clean-up.
    
    # Identify whether the docker logical volume was created.
    sudo lvs | grep docker
    # If the volume exists, remove it.
    sudo lvremove docker
    
    # Identify whether the docker volume group was created.
    sudo vgs | grep docker
    # If the volume exists, remove it.
    sudo vgremove docker
    
    # Identify whether the docker physical volume was created.
    sudo pvs | grep docker
    # If the volume exists, remove it.
    sudo pvremove <PV Name>
    
    # Clean the docker device by replacing "{docker-device}" in the following command:
    sudo parted /dev/{docker-device} mklabel gpt -s
  3. Purge IPTABLES

    # List iptables.
    sudo iptables -L -n -v
    
    # Delete any entries.
    sudo iptables -F
    sudo iptables -X
    
    # Flush nat IP table.
    sudo iptables -t nat -F
    sudo iptables -t nat -X
    
    # Flush filter IP table.
    sudo iptables -t filter -F
    sudo iptables -t filter -X
    
    # Verify that iptables are clean
    iptables-save
    
    # Persist current iptables state for a server restart
    iptables-save > /etc/sysconfig/iptables
  4. Restart the server

    reboot
  5. Verify the requirements are met after the server restart.

  6. Depending on the state of the full or partial install that you are replacing, the previous commands might not completely return the system to an installable state. Before beginning reinstallation, ensure that your system still meets all prerequisites listed in the Product Prerequisites are met.