Programatically Delete a content type in Drupal
<?php
$result = db_query("SELECT nid FROM node where type='mytype'");
while ($row = db_fetch_object($result)) {
node_delete($row->nid);
}
node_type_delete('mytype');
?>
[2022: This is very old]
Technical information on this site may be out of date : no updates since 2015
<?php
$result = db_query("SELECT nid FROM node where type='mytype'");
while ($row = db_fetch_object($result)) {
node_delete($row->nid);
}
node_type_delete('mytype');
?>
[2022: This is very old]