MATCH (n) DETACH DELETE n
DETACH doesn't work in older versions(less then 2.3), for previous versions use
DETACH
MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n, r
MATCH (n:Book) DELETE n