Uninstalling Apache Cassandra
Steps for uninstalling Apache Cassandra by install type.
This topic provides information on completely removing Apache Cassandra™ from your machine.
Note: If you want to keep the installation or
if you don't remove the installation immediately, see Preventing the node from re-joining the cluster.
Select the uninstall method for your type of installation.
Uninstalling Debian- and RHEL-based packages
Use this method when you have installed Apache Cassandra™ using APT or Yum.
- Stop the Cassandra
services:
sudo service cassandra stop
- Make sure all services are
stopped:
ps auwx | grep cassandra
- If services are still running, use the PID to kill the
service:
sudo kill cassandra_pid
- Remove the library and log
directories:
sudo rm -r /var/lib/cassandra
sudo rm -r /var/log/cassandra
- Remove the installation directories:RHEL-based packages:
sudo yum remove "cassandra-*"
Debian-based packages:
sudo apt-get purge "cassandra-*"
Uninstalling the binary tarball
Use this method when you have installed Cassandra using the binary tarball.
- Stop the node:
ps auwx | grep cassandra
-
sudo kill <pid>
- Stop the DataStax Agent if
installed:
sudo kill datastax_agent_pid
- Remove the installation directory.
Preventing the node from re-joining the cluster
The following steps will prevent the node from re-joining the cluster if someone inadvertently starts Cassandra again.
- Stop Cassandra using one of the above methods.
- In the cassandra.yaml:
- Change the cluster_name to DECOMMISSIONED.
- Set the - seeds list to 127.0.0.1.
- Restart the node.