User login


Delete a content type programmatically in Drupal 7

This is what i put as an update hook in a .install file:

Getting rid of modules entirely, with update function for cleanup

When deleting modules in code you can clean up after the fact, esp. for modules that don't clean up after themselves well enough on uninstall.

git rm -r sites/all/modules/contrib/hashcash

git rm -r sites/all/modules/contrib/imageapi

To your update module, we can add:

drupal 6 delete all nodes by anonymous user

VBO (Views Bulk Operations, a great module) does an admiral job. I could only get it to work for about 250 at a time; 500 at a time didn't time out but instead weirdly caused a validation error. Also of note: Filtering by user, the autocomplete has anonymous as Anonymous even if you've renamed as Visitor or such. And there is no "anonymous" role to filter by so if going by role, it has to be an "everything but everything else" filter.

Syndicate content