# Delete Document Type

**URL:** <https://community.bloomreach.com/t/delete-document-type/1833>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [March 28, 2020, 5:04am UTC](https://community.bloomreach.com/t/delete-document-type/1833 "2020-03-28T05:04:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/thomas/32/753_2.png) [@Thomas](https://community.bloomreach.com/u/Thomas)\
**Post date:** [March 28, 2020, 5:04am UTC](https://community.bloomreach.com/t/delete-document-type/1833/1 "2020-03-28T05:04:59Z")

</div>

Deleting document types within cms is not possible ☹  
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 ?

---

<div class="post-metadata">

**Author:** ![William\_Borg\_Barthet](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/william_borg_barthet/32/145_2.png) [@William\_Borg\_Barthet](https://community.bloomreach.com/u/William_Borg_Barthet)\
**Post date:** [March 30, 2020, 7:03am UTC](https://community.bloomreach.com/t/delete-document-type/1833/2 "2020-03-30T07:03:19Z")

</div>

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.

HTH,

William

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/thomas/32/753_2.png) [@Thomas](https://community.bloomreach.com/u/Thomas)\
**Post date:** [March 30, 2020, 2:41pm UTC](https://community.bloomreach.com/t/delete-document-type/1833/3 "2020-03-30T14:41:22Z")

</div>

@William_Borg_Barthet:  
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 🙂

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 ???

---

<div class="post-metadata">

**Author:** ![jeroen.hoffman](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jeroen.hoffman/32/43_2.png) [@jeroen.hoffman](https://community.bloomreach.com/u/jeroen.hoffman)\
**Post date:** [March 30, 2020, 3:21pm UTC](https://community.bloomreach.com/t/delete-document-type/1833/4 "2020-03-30T15:21:33Z")

</div>

Hi,  
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 [https://documentation.bloomreach.com/13/about/upgrade/namespace-migration.html](https://documentation.bloomreach.com/13/about/upgrade/namespace-migration.html)

HTH  
Jeroen

---

<div class="post-metadata">

**Author:** ![Thomas](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/thomas/32/753_2.png) [@Thomas](https://community.bloomreach.com/u/Thomas)\
**Post date:** [March 30, 2020, 3:27pm UTC](https://community.bloomreach.com/t/delete-document-type/1833/5 "2020-03-30T15:27:10Z")

</div>

@jeroen.hoffman  
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 🙂

---

<div class="post-metadata">

**Author:** ![jeroen.hoffman](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jeroen.hoffman/32/43_2.png) [@jeroen.hoffman](https://community.bloomreach.com/u/jeroen.hoffman)\
**Post date:** [April 1, 2020, 12:26pm UTC](https://community.bloomreach.com/t/delete-document-type/1833/6 "2020-04-01T12:26:46Z")

</div>

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

Cheers, Jeroen
