Search code examples
cassandradatastax-enterprise

How do I wipe all out all the data in Cassandra?


While building a new datacenter, I accidentally have the new nodes join a current datacenter. I did a nodetool remove on those nodes. What’s the best way to delete/erase any data on those new nodes so I can start from scratch? Is doing a rm -rf /var/lib/cassandra/* enough to ensure my node in a clean state?


Solution

  • First you have to remove/decommission those nodes from current datacenter.Once it is finished successfully delete all the data files, saved_cache and commitlogs on same nodes. When you add them into new datacenter all your data,saved_cache and commitlog dir should be empty.