I would like to un-publish binaries (PDFs) which are not being referenced in any of the component currently. How can I achieve that? please help

  • It's a DXA application and storing binaries in database.
    – Thakur
    Commented Aug 25, 2020 at 14:06
  • can you add more details? Is it published dynamically? Commented Aug 25, 2020 at 15:40
  • No, static only
    – Thakur
    Commented Aug 25, 2020 at 16:32
  • Tittle says you want to publish but the description says you want to unpublish? please explain bit more details what exactly you are trying to do?
    – Velmurugan
    Commented Aug 26, 2020 at 4:53
  • It is unclear what you mean exactly with "binaries which are not being referenced in any of the Components". See my answer where I interpreted it as "binaries which do not have a related Component", but please be more specific in what you mean with it. Commented Aug 26, 2020 at 12:24

3 Answers 3


I suggest that you use Powershell an Tridion Core service.

Get a list of tcmids you want to unpublish.

Then process the list of tcmids and generate tridion core service UnPublish transactions.


The reason why you specify a "Related Component" when adding Binaries in the CM API is so the Binaries can be unpublished (indirectly, by unpublishing that related Component).

The (legacy) RenderedItem.AddBinary overload which does not take a relatedComponent parameter is marked as obsolete with the following warning: Adding binary data without specifying a related Component results in unmanaged binaries in Content Delivery. Use an overload which accepts a relatedComponent parameter.

So: AFAIK, there is no (supported) way to unpublish Binaries which were published without specifying a related Component.


If I understand correctly you looking for static binary assets to be published to FS, those binary assets not been used in any component or pages metadata. if it's yes then it's possible.

refer to @Nickoli Roussakov's article nicely explained with sample code. http://www.tridiondeveloper.com/publish-an-image-to-a-structure-group-mirroring-folder

I hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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