Deletion files/folders with retention labels in a specific SharePoint Online site

New Contributor

Hi All,

I have been asked to delete few folders with old files, which doubles with same folders in other location. There are retention labels applied to the files.

I cannot delete those specific folders and subfolders because of the labels (although I do not receive any error messages), as SP admin and I had to change the labels to 'None' on file by file basis and then delete...This takes lots off effort and time as I have lots to do.


My question is - Is there a way (GUI or PowerShell) to remove or change the labels to 'None' in specific SP library or folder (and subfolders) so they can be deleted?


I do not want to change/delete/remove labels for the whole tenant - but just on library/folder/subfolder level.

All I can see is either remove or add labels in Compliance centre for the whole M365 and tenant..

Thanks in advance!


7 Replies

You'll need to remove the label from those items first, this is done on each item individually, not via the SCC.

Hi @Vasil Michev - thanks for fast reply.


That was part of my question - how to remove them?

I mean easily? I was going to each subfolder and selecting each file(s) and setting the Labels to 'None'.

But this requires lots of that action as there are lots of subfolders and subfolders etc.

Is there a Powershell I can use to select the url - i.e. and the run a command towards that folder to set labels on all items within it to a label 'None'?


If I select the folder and set the label to 'None', then the files in the subfolders retain the label and does not allow me to delete..


There is not much on that topic on internet, i'm surprised...



Hi @RSWork ,


If the labels have not been set individually on files then you can change the label at the highest folder you want to delete and the label will cascade. I haven't yet had to remove labels via powershell sorry. 


In your case it may either take a bit of time to update or the labels have been set individually. 

@Andrew Hodges Updating the folder retention label did not affect the files in it and they are still having a retention label that is preventing deletion. Is there any other way to remove the retention label in bulk? Thanks

We also have a need for bulk or automated removal
Did you manage to find a solution for this?

This is really weird.


Files with rentention label can be deleted

Folders with retention label cannot be deleted.


What is the logic behind?