Legacy Knowledge Base
Published Jul. 2, 2025

Removing Sample Document Types in the Documents and Media Repository

Written By

Justin Choi

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Description

This article describes how to remove the default "Document Types" from the Documents and Media portlet. These sample Document Types are created when Liferay DXP 7.0 is started for the first time. These exist so that document creators and reviewers can leverage specific metadata fields for each document in the Documents and Media repository. For example, the Contracts Document Type offers customized fields, such as Legal Reviewer and Effective Date.

The use case is when site administrators want to delete the sample data and keep only those they want. The sample Document Types can be deleted successfully, but the Document Types themselves are always recreated the next time the application server is ever restarted.

Resolution

There is a way to prevent the default Document Types from being recreated every time the platform is started.

  1. First, delete all the unwanted Document Types.
    1. Navigate to the Control Panel → Content :→ Documents and Media
    2. Click the 3 dot icon → Document Types in the upper right corner.
    3. Click the 3-dot icon → Delete.
  2. Second, navigate to the Control Panel → Configuration → System Settings.
  3. Click the Collaboration tab.
  4. Click Documents & Media Service.
  5. Uncheck the Add Default Structures checkbox.
    documents-media-types.png
  6. Click Save.

At this point, the Document Types have been deleted and cannot be restored in the Recycle Bin.

 

If the application server is ever restarted, the Document Types are not recreated. To add them back, reverse the process by checking the Add Default Structures then restart the application server.

Did this article resolve your issue ?

Legacy Knowledge Base