This module is used to delete all content and/or users from a site. This is mainly a developer tool, which can come in handy in several cases, listed below.
The usual way to do this is to go to Administer -> Content then select all the nodes and delete them. This works if you have a handful of nodes only. If you have hundreds or thousands of nodes, then it is not a practical solution.
Another option is to directly delete the nodes from the node table in the database. This does not work properly, since there are also comments, and many tables for add on modules that needs to be cleaned.
- This is a test site that the client was using for a period of time, and they must clean it up before starting with real data.
- You are testing something that creates a lot of nodes (e.g. aggregator), and want to do it over and over again.
- You created a site in the past and want to replicate it again, but with new content.
Note that for nodes, comments and all additions to nodes that contributed modules may have added. For users, any additional module data will also be deleted.
Usage
Drush
drush delete-all
Example: drush delete-all article
Drush on Drupal 7 version
Delete all nodes, nodes of a specific content type or users.
Examples: