Drop Keyspace Cassandra

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Cassandra Drop Keyspace

In Cassandra, "DROP Keyspace" command is used to drop keyspaces with all the data, column families, user defined types and indexes from Cassandra.

Cassandra takes a snapshot of keyspace before dropping the keyspace. If keyspace does not exist in the Cassandra, Cassandra will return an error unless IF EXISTS is used.


  1. DROP  keyspace KeyspaceName ;  


Let's take an example to drop the keyspace named "javatpoint".

DROP keyspace javatpoint;

Cassandra Drop keyspace 1


After the execution of the above command the keyspace "javatpoint" is dropped from Cassandra with all the data and schema.

You can verify it by using the "USE" command.

Cassandra Drop keyspace 2

Now you can see that "javatpoint" keyspace is dropped. If you use "DROP" command again, you will get the following message.

Cassandra Drop keyspace 3