Possible Duplicate:
Deleting all the items from a large list in SharePoint
What is the fastest way to delete all items in a list programmatically? I do not want to remove list and re-create it, but I need to get rid of all items.
The way I do it right now, with a console application:
SPList list = mWeb.GetList(strUrl);
if (list != null)
{
for (int i = list.ItemCount - 1; i >= 0; i--)
{
list.Items[i].Delete();
}
list.Update();
}
