Delete all nodes from database except from user1 and admin I have got thousands of junk entries in my Drupal 6 website. Is there a way I can Delete all nodes from database accept from user1 and admin.

I also want to delete all users accept user1 and admin.
Yes, you could do that with

views_bulk_operations

It will delete the nodes and users progressively using the Batch API.


Create a content / node based View
Add the bulk operations field
Configure bulk operations field to add "Delete item'
Add filters to View to exclude content from user1 / admin
Run the View, check to select all rows, and bulk delete the relevant nodes.


Repeat using a user-based View to delete users.

Note, prior to deleting users, check the account cancellation settings at Admin &gt; Configuration &gt; Account settings &gt; Registration and cancellation