Could some some please help me with the steps/script to directly unpublish pages from the Tridion database, not from the CM explorer. We have a requirement to unpublish about 16000 different pages in different publication and deleting it through the CM explorer would be a huge task. Is there a way to automate this process or run a script on the database to unpublish and then delete them.

Any help is much appreciated!! thanks!!

  • Consider scheduling unpublishing in smaller requests if the amount is a concern. When do you start having problems with the size of an unpublishing request? Feb 5, 2014 at 13:25

5 Answers 5


What are those pages? In Tridion 2013 you can call ICoreService2013.DecommissionPublicationTarget method which will quickly mark everything that was published with particular publication target as unpublished. You can then write a script to delete the pages through any public API.

Manipulating the database directly will give you way more troubles than you think.

  • Sorry i did not mention it earlier, I am using Tridion 5.3. Can something like this still be used in this version?
    – user901
    Feb 7, 2014 at 15:40

Speak to SDL Tridion support for an approved script.

Alternatively, you could write a core service / business connector script to unpublish, and then delete each page in a supported approach.

Performing this directly on the database is not supported / ever advisable.


Do this at your own risk and consider the Support/Warranty related warnings the other answers provide.

You'll need to update 2 tables in the CM DB as follows:

Update PUBLISH_STATES table:

UPDATE publish_states
SET state=0
WHERE publication_id=<your pub id>
AND item_type=64
AND state=1

Update ITEM_STATES table:

UPDATE item_states
SET state=0
WHERE publication_id=<your pub id>
AND state=1
AND publication_target_id=<your target id>
  • 2
    This will only mark the pages as unpublished, it will NOT unpublish them.
    – Nuno Linhares
    Feb 9, 2014 at 0:21

When you unpublish an item, it is removed from CD and published status is updated in CM. If you update the records in CM DB by directly running a script(though it is not recommended), published content in CD will become orphans and can't be removed unless you run another script to remove those published content in CD (which is again not recommended).

Building a solution using core services is the right way of getting this done.

  • the Tridion we are using is Tridion version 5.3. Can we use core services in this version? i could not find much searching online about it.
    – user901
    Feb 7, 2014 at 14:13
  • On Tridion 5.3 you can use the TOM or TOM.NET to accomplish the same. Going through an API is much preferred to direct database updates. Feb 8, 2014 at 15:58

Directly unpublish pages from the Tridion database, not from the CM explorer

This means you know what pages and what templates are involved for unpublishing.

Best way is to create a Core Service which takes input as

  • Template type or
  • Page TCM ID or
  • Component Template TCM ID or
  • Page Template TCM ID

Get all the items which are published based on the criteria and do UnPublish.

With this, you will have full track of

  • What you are doing
  • Which items are published
  • Which items are unpublished

In future, you can this core services just like that.


Now you have mentioned that you are using Tridion R5.3. In this case, you need to write a Custom Page using Classic ASP which takes the input as I mentioned above.

  • the Tridion we are using is Tridion version 5.3. Can we use core services in this version?
    – user901
    Feb 7, 2014 at 12:44
  • @user901: If you are using Tridion R5.3 then you need to write Classic ASP custom page which does same as I mentioned above. Feb 8, 2014 at 11:59

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.