How to delete all nodes of a given content type?
There is a module for that (TM).

See Bulk Delete.

That will use the Batch API to delete the nodes to avoid timeout or memory issues when deleting thousands of nodes with a single call to node_delete_multiple().

Bulk Delete is an abandoned module.  See for alternatives:


Views Bulk Operations
Delete All