Mass Delete Old Content [nodes]?

JymBrittain - August 30, 2006 - 16:00

Background: I was using aggregator2 to run a site [http://technology4teachers.com] that aggregated numerous RSS feeds and promoted them to nodes. I upgraded to 4.7.3 and this isnt working anymore. That's no big deal and not the issue except that I am now the proud owner of a website that has about 595 pages with 30 stories each that I would like to remove.

Issue: How does one easily remove over 17500 stories? Searching the documents here for "remove old content", "delete old content", "delete old nodes" did not yield useful information.

=-=

VM - August 30, 2006 - 16:25

would probably be easiest by removing them out of the database itself. using phpmyadmin or whatever your host allows to access your DB.

Try this

spatz4000 - August 30, 2006 - 20:29

UPDATE {node} SET STATUS=0 where nid > whatever

Change the the where clause to target the nodes you want. Also you'll need to change the {node} to whatever you node table is named.

SOLVED

JymBrittain - September 1, 2006 - 10:58

I solved this issue by executing some SQL against the drupal database. I used the commands:
DELETE FROM node WHERE type='aggregator2-item';
and
DELETE FROM node WHERE type='aggregator2-feed';

I hope this helps others.
technology4teachers.com

not quite good

dvsouza - November 15, 2006 - 02:11

This will leave you with a lot of garbage on your database... like orphan term_node references...

--
"Slackware users: Klingons of the computing world."
http://blogs.nshp.org/dsouza

any way of doing this now?

Gentoo7 - April 20, 2009 - 11:39

any way of doing this now?

=-=

VM - April 20, 2009 - 16:53

you can filter the content at administer -> content
use the checkall check box and batch delete.

automatically? cron?

Scothiam - September 28, 2009 - 01:36

Hi, I was wondering if there was a way to do this automatically... I'd love to set a script to delete any nodes of a certain type and a certain age that have not been published... daily.

cheers,
scot

Look at the Auto Expire module

stg11 - September 30, 2009 - 20:34

See http://drupal.org/project/auto_expire

Allows for unpublishing and purging.

Edwin M. Basye
http://sitesthatgrow.com

 
 

Drupal is a registered trademark of Dries Buytaert.