Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Paragraph cleanup

Security covered Maintenance fixes only 11 sites

This module provides a tool to identify and delete orphaned paragraphs. It lists paragraph types used in your content, allowing you to clean up unused paragraphs.

Paragraph Cleanup shows how each paragraph type is used, and safely removes paragraphs that no content uses anymore.

Paragraphs are saved separately from the content that holds them. When content is deleted, or a paragraph is removed from it, the paragraph can stay behind in the database as an orphan. Over time, orphans and old paragraph revisions grow the database, slow down queries and bloat backups. Paragraph Cleanup finds them, lets you review them per paragraph type, and deletes them only when it is safe.

Features

  • Overview of paragraph types: how many paragraphs each type has, which fields allow it, and which types are used nowhere and can be deleted, with a direct link to delete them.
  • Scan first, delete later: count the orphaned paragraphs and unused revisions of the types you select. Scanning never deletes anything.
  • Safe cleanup: after you confirm, each paragraph is checked again and only deleted when no revision of its parent content uses it. Paragraphs used only by an older revision of the content are kept, so reverting content still works.
  • Unused revisions: optionally delete old revisions of paragraphs that are still in use, to free space. The current content is not affected.
  • Built for large sites: scanning and cleaning run in batches, in the browser or with Drush, so they do not time out.
  • Drush commands to scan and clean, for scripts and scheduled maintenance, with table or CSV output.
  • Restricted access: a dedicated permission, given to site administrators on update.

Orphans are detected with the same check as the Delete orphaned composite entities tool of Entity Reference Revisions, which cleans every composite entity type at once and without a report. Paragraph Cleanup adds a review per paragraph type before anything is deleted.

Requirements

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

composer require drupal/paragraph_cleanup
drush pm:enable paragraph_cleanup

Usage

  1. Give the Administer paragraph cleanup permission to the roles that may delete paragraphs.
  2. Go to Configuration » System » Paragraph cleanup (/admin/content/paragraph-cleanup).
  3. Select paragraph types and click Scan selected types. The table shows the orphaned paragraphs and unused revisions found. Nothing is deleted.
  4. Make a database backup, then click Delete orphans in selected types and confirm. Optionally, also delete unused revisions.

Support

Report bugs and request features in the issue queue.

Drupal 10–11

Ask your assistant about Paragraph cleanup

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Aug 2024
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Oct 14, 2026
1.0.0 Stable 10 Aug 22, 2024