2

I have deleted the content types from the libraries/lists using powershell, but now when I go to delete them at the site level it tells me the content type(s) is still in use. I have checked the Recycle bins of the subsites if there are still items which might be using any of the content type(s), but there is nothing there. Any idea where else I should be looking for the content types? Or where are they still being used?

Here is a snippet of the code:

$web = Get-SPWeb "http://intprod.local/sites/regions/ap/"
Write-Host $web.Title -ForegroundColor Yellow
foreach($ctype in $web.ContentTypes)
{
        if($ctype.Name -eq "Advertisement")
        {
            Write-Host "CT to be deleted: " $ctype.Name -ForegroundColor Red
            $ctype.Delete()
        }
 }
  • 1
    Probably items using the content type. Have you seen sharepoint.stackexchange.com/a/14576/627 ? – eirikb Jul 15 '15 at 7:28
  • According to powershell it is not being used in any items, and I have deleted them from the libraries. If they were in use in libraries I would not have been able to delete them there. – Imir Hoxha Jul 15 '15 at 7:46
  • There is 2 stages of recycle bins, you should check the site collection administrator recycle bin and remove the items from there to. As long as they remain there, they still "exists". – Christoffer Jul 15 '15 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.