title: How can I reinstall a cassandra on ubuntu?
body: <p>I'm newbie in the Ubutu(linux) + Cassandra.</p>
  
  <p>I tested Cassandra on my ubuntu machine with OpenJdk. There are some nice articles to explain how to install a Cassandra on ubuntu, so I could do that. I changed some config values and checked it run correctly.</p>
  
  <p>And, I decided to remove the cassandra and reinstall for getting the clean one.</p>
  
  <p>[What-I-Do]</p>
  
  <p>I uninstall Cassandra with following steps:</p>
  
  <ol>
  <li><p>uninstall Cassandra using apt-get</p>
  
  <blockquote>
    <p>apt-get remove cassandra</p>
  </blockquote></li>
  <li><p>remove data/log/ directories </p>
  
  <blockquote>
    <p>rm -rf /var/lib/cassandra</p>
    
    <p>rm -rf /var/log/cassandra</p>
    
    <p>rm -rf /etc/cassandra</p>
  </blockquote></li>
  </ol>
  
  <p>After that I tried to install new cassandra</p>
  
  <blockquote>
    <p>apt-get install cassandra</p>
  </blockquote>
  
  <p>[Error-Message]</p>
  
  <blockquote>
    <p><code>sudo cassandra -f</code></p>
    
    <p>Exception in thread "main" java.lang.ExceptionInInitializerError
    Caused by: java.lang.RuntimeException: Couldn't figure out log4j configuration: log4j-server.properties</p>
    
    <p>at org.apache.cassandra.service.AbstractCassandraDaemon.initLog4j(AbstractCassandraDaemon.java:86)</p>
    
    <p>at org.apache.cassandra.thrift.CassandraDaemon.(CassandraDaemon.java:62)
    Could not find the main class: org.apache.cassandra.thrift.CassandraDaemon. Program will exit.`</p>
  </blockquote>
  
  <p>and there are no files under "/var/lib/cassandra", "/var/log/cassandra" and  "/etc/cassandra" directories OTL.</p>
  
  <p>I want to know, what I miss.</p>