SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to clear the data contained in a list programmatically.

I know I can iterate through every single item to delete it, but that takes forever.

Any suggestion?

(I'm with the client object model by the way)


share|improve this question
up vote 4 down vote accepted

Fastest method is to delete list and then recreate it from scratch trough UI. However in many scenarios this is not possible.

If you cannot use server object model to do deletion next best thing is to use Lists.UpdateListItems webservice and preform batch deletion.

Take a look at this SO question and accepted answer:

How to Delete all the Items from SharePoint List without iteration using SharePoint Webservice

share|improve this answer

As I know it allways was a problem to clear SharePoint list. I did it that way - I created a list template from my target list and then I was able to delete list and quickly recreate it again. As I remember it was a quite acceptable solution. But I did it from server side object model.

share|improve this answer
Recreating the list is a fairly expensive operation (since you get db hits for deleting the list, recreating it, and adding the items again). Also the list will have a new GUID which might mess some things up (for example if you have some web parts using GUIDs, third party apps, workflows, etc.). Best to use the UpdateListItems batch method above. – Bil Simser Feb 9 '12 at 2:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.