title: How do I delete a Kafka topic from the cli?
body: <pre><code>$ kafka-topics --zookeeper localhost:2181 --list | grep my-topic
  my-topic
  $ kafka-topics --zookeeper localhost:2181 --delete --topic my-topic
  Topic my-topic is marked for deletion.
  Note: This will have no impact if delete.topic.enable is not set to true.
  $ kafka-topics --zookeeper localhost:2181 --list | grep my-topic
  my-topic - marked for deletion
  </code></pre>
  
  <p>It's been hours since then, and the topic has still not been deleted.</p>
  
  <p>I've seen suggestions that I should put <code>delete.topic.enable</code> in my <code>server.properties</code> and restart kafka. I've tried this. It hasn't worked.</p>
  
  <pre><code>$ grep -F delete.topic.enable /usr/local/etc/kafka/server.properties
  delete.topic.enable = true
  </code></pre>
  
  <p>(Why wouldn't this be set by default?)</p>
  
  <p>In any case, these suggestions have all been for kafka 0.* and I am on a newer version.</p>
  
  <pre><code>$ brew list --versions kafka
  kafka 1.1.0
  </code></pre>
  
  <p>How do I delete topics?</p>
  
  <p>I can shutdown kafka and zookeeper, run <code>rm -r /usr/local/var/lib/kafka-logs /usr/local/var/run/zookeeper/data</code>, then start zookeeper and kafka again. But this is rather drastic. Surely there should be some way of persuading <code>kafka-topics</code> to actually delete a topic?</p>