I want to create an automated installation script which includes Cassandra. I had some trouble before which I solved before by deleting "~/.cassandra". Is it safe to delete it automatically every time I run the script?
"~/.cassandra" folder - what is it used for?
1.7k views Asked by Serban Stoenescu At
2
There are 2 answers
0
On
Typically, the .whatever folders and files are "hidden" by convention and are typically used for storing shell history and things like that. Sometimes they can be used to store configuration, but that is on a per-application basis.
The .cassandra folder is not mentioned in the documentation, so I suspect you are safe to delete it as long as you don't mind losing the shell history.
I don't know specifically about Cassandra, but I would suspect it is used for shell history. You could always look into it and see.
Safe? Sure, but probably not a good idea.
The
.cassandra
directory holds command history for yourcqlsh
,cli
, andnodetool
sessions. It is also the default location for the.cqlshrc
file, which (if created) allows you to persist various settings for yourcqlsh
sessions (username, default keyspace, timestamp format, etc...).So while I don't think you'll hurt anything by deleting it, I wouldn't do it.
There was probably something goofy in your
cqlsh
history at one point, and deleting the entire folder prevented it from crashing on a parsing error (if I had to guess).