Delete Document Type

Deleting document types within cms is not possible :frowning:
How can I delete unused doctypes?

I tried the following:

  1. Delete them from namespace in console!
  2. Export CND from console, delete the relevant entries and imported the changed CND back to console.
  3. delete storage and target folders and rebuild/restart

Allthough I cannot see them in CMS, they remain in CND and e.g. in essentials for mapping with some features (e.g. taxonomy)

What is happening ?

Hi Thomas,

documents in the CMS are defined under /hippo:namespaces, they consist of several nodes defined in JCR in the CND. To remove a document type from the CMS, it is sufficient to delete it from /hippo:namespaces.

Removing a CND entry is more tricky, as this is an unsafe change. In local development, just make sure you remove all instances of the node type and delete it from your CND in your repository data modules. Also, be sure to delete any local repo (like ./storage).

In a deployed environment, removing an unwanted CND entry is much trickier and is not recommended. It is a lot of effort that will not result in anything for the end-user. I would recommend just ignoring deprecated CND entries and moving on.



I am still in the developement environment . So I am playing a bit and want to do some housecleaning, when I was on a wrong way :slight_smile:

I managed to get completly rifd of the unwanted docTypes by deleting in the CND File under repository-data/application/… .

What I do not understand is, why it does not work when I export the CND, modify it and import it again from the console ???

Deleting doc types from cnd just isn’t supported on existing repositories, from the JackRabbit JCR implementation… that is a backwards incompatible change. You’d need to remove all instances of that type as well, and is unpredictable how much that’d be.

See also


Thanks for that hint. I do not want to delete documentType already deployed to the production.
In my case they are only in the developement area and of course I also delete all Instances of documents with that document type :slight_smile:

Yes perfect, then remove it manually, remove existing storage and start up.
CND import is as if importing on existing repo.

Cheers, Jeroen