Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Uninstall Impact

Last updated on
3 October 2026

Uninstalling a module in Drupal deletes more than the module itself. Uninstall Impact lists, for your site, exactly what would go before you uninstall. This page explains what Drupal deletes and why, with real examples.

Will Uninstall Impact change my site? No. It only reads. It never uninstalls, deletes or edits anything. It asks core the same questions core asks during an uninstall, as a dry run.

The surprise: everything you built with it

When a module provides a kind of configuration (contexts, webforms, image styles, workflows…), every item you create is stored under the module's name. With the Context module, every context is stored as context.context.<id>.

On uninstall, Drupal deletes every configuration item whose name starts with the module's name. So uninstalling Context deletes every context anyone created after installing it, without listing them first.

Technical: ConfigManager::uninstall() runs $this->configFactory->listAll($module . '.') and deletes each one.

Everything Drupal does when you uninstall

  1. Uninstalls the modules that depend on it too. Uninstalling File also uninstalls Image, for example.
    Technical: ModuleInstaller::uninstall() adds every installed module in required_by.
  2. Refuses if something blocks it. Most often there is still content of a type the module provides: "There is content for the entity type: …".
    Technical: the module uninstall validators (ModuleInstaller::validateUninstall()).
  3. Fixes or deletes configuration that depends on it. Each item that declares the module first gets a chance to fix itself: a role loses the module's permissions, a view loses a filter. Whatever can't be fixed is deleted, such as a workflow or a whole view.
    Technical: ConfigManager::getConfigEntitiesToChangeOnDependencyRemoval(), then onDependencyRemoval() on each.
  4. Deletes everything named after it: its settings, and everything built with it (see above).
  5. Drops the tables of content types it provides, with all their rows.
    Technical: EntityDefinitionUpdateManager::uninstallEntityType().
  6. Purges fields it added to other content, from every item, in batches on cron.
  7. Drops its own database tables (from hook_schema()), with every row.

What it does not do: remove configuration that uses the module without declaring it (that stays behind, broken), or delete files the module wrote.

Real examples

From a Drupal 11 site with the standard profile plus Content Moderation:

Module What Uninstall Impact showed
Content Moderation Blocked: 3,714 content moderation state records exist. Would delete the Editorial workflow and the Moderated content view. The editor and reviewer roles would lose their moderation permissions.
Image Would delete 4 image styles and the image settings. 37 other configuration items would change to stop using it, and 11 would be deleted. Blocked while image fields hold data.
Contact Would delete 2 contact forms and the contact settings. 3 roles would lose contact permissions.

How to use it

  • Before uninstalling: click What uninstalling deletes next to the module on the Uninstall page, or go to Reports » Uninstall impact.
  • From the command line or in CI:
    drush uninstall-impact context
    drush uninstall-impact webform,webform_ui --format=json
  • Keep what you need: export the configuration listed under "everything built with it" first (single-item export, or drush config:export to a separate folder), and back up the listed tables.

Help improve this page

Page status: No known problems

You can: