Delete data from sharepoint list

%3CLINGO-SUB%20id%3D%22lingo-sub-2511487%22%20slang%3D%22en-US%22%3EDelete%20data%20from%20sharepoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2511487%22%20slang%3D%22en-US%22%3EI%20have%20a%20SP%20list%20with%20about%2040k%20rows.%20I%20need%20to%20clean%20this%20and%20delete%20old%20rows.%3CBR%20%2F%3E%3CBR%20%2F%3EBut%20I%20can%20not%20find%20an%20good%20way%20to%20delete%20large%20amounts.%3CBR%20%2F%3EI%20basically%20can%20only%20work%20with%20100-200%20posts%20at%20a%20time%20and%20it%20lags%20very%20much.%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20I%20sync%20it%20to%20excel%20and%20then%20update%20it%20to%20SP%3F%3CBR%20%2F%3E%3CBR%20%2F%3EOther%20solutions%3F%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2511487%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E2016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2513064%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20data%20from%20sharepoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2513064%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F89819%22%20target%3D%22_blank%22%3E%40Oskar%20Kuus%3C%2FA%3E%26nbsp%3BI%20believe%20PowerShell%20is%20your%20savior.%20You%20can%20use%20it%20in%20any%20way%20you%20want%20to%20fulfill%20your%20needs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDelete%20a%20single%20item%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.sharepointdiary.com%2F2016%2F01%2Fsharepoint-online-delete-list-item-using-powershell.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sharepointdiary.com%2F2016%2F01%2Fsharepoint-online-delete-list-item-using-powershell.html%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDelete%20multiple%20items%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.sharepointdiary.com%2F2015%2F10%2Fdelete-all-list-items-in-sharepoint-online-using-powershell.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sharepointdiary.com%2F2015%2F10%2Fdelete-all-list-items-in-sharepoint-online-using-powershell.html%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F17895.powershell-script-to-delete-items-from-sharepoint-list.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.technet.microsoft.com%2Fwiki%2Fcontents%2Farticles%2F17895.powershell-script-to-delete-items-from-sharepoint-list.aspx%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20a%20thought%20-%20You%20can%20create%20a%20view%20based%20off%20the%20certain%20condition%20(e.g.%20SP%20view%20for%20older%20items)%2C%20and%20delete%20the%20items%20manually%20by%20selecting%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor
I have a SP list with about 40k rows. I need to clean this and delete old rows.

But I can not find an good way to delete large amounts.
I basically can only work with 100-200 posts at a time and it lags very much.

Can I sync it to excel and then update it to SP?

Other solutions?
1 Reply

@Oskar Kuus I believe PowerShell is your savior. You can use it in any way you want to fulfill your needs.

 

Delete a single item: 

https://www.sharepointdiary.com/2016/01/sharepoint-online-delete-list-item-using-powershell.html

 

Delete multiple items:

https://www.sharepointdiary.com/2015/10/delete-all-list-items-in-sharepoint-online-using-powershell.... 

https://social.technet.microsoft.com/wiki/contents/articles/17895.powershell-script-to-delete-items-... 

 

Just a thought - You can create a view based off the certain condition (e.g. SP view for older items), and delete the items manually by selecting all.

 

Hope it helps.