How to delete a publication from Tridion

By | March 26, 2010

Recently I came across a post (and a fellow Tridion blogger, keep up the good work!) which answered the question “Why won’t this publication delete?“.  It describes a tool (source code included) which helps you find the pages which you need to unpublish before you can delete the publication. It mentions two prerequisites which need to be met before you can delete a publication:

  • No pages in the publication are published
  • There are dependencies on the publication, child publications etc.

I would like to add a third prerequisite:

  • Check the publishing queue for publish transactions which belong to the publication to be deleted which have the status “in progress”.  In some instances publication transactions never leave this state and they will prevent you from deleting the publication.

In addition I would like to propose another way of ‘unpublishing’ all items in a publication (pages, components, MM components etc) by running the following query on the CM database (back-up the DB first) :

SET              STATE = 0

This will not remove the records from the Tridion broker DB or any files from the webserver. However in many cases removing a publication from Tridion corresponds to removing a website as well and deleting the files manually will prove to be much faster than unpublishing them. I recently chose this route because my delete task comprised of no less than 12 publications containing thousands of pages and published (MM) components. In addition this activity needed to be executed throughout an OTAP environment.