diff -u b/core/modules/system/src/Form/ModulesUninstallForm.php b/core/modules/system/src/Form/ModulesUninstallForm.php --- b/core/modules/system/src/Form/ModulesUninstallForm.php +++ b/core/modules/system/src/Form/ModulesUninstallForm.php @@ -120,6 +120,9 @@ uasort($uninstallable, 'system_sort_modules_by_info_name'); $validation_reasons = $this->moduleInstaller->validateUninstall(array_keys($uninstallable)); + // Remove any profiles from the list. + $uninstallable = array_diff_key($uninstallable, $profiles); + $form['uninstall'] = array('#tree' => TRUE); foreach ($uninstallable as $module_key => $module) { $name = $module->info['name'] ?: $module->getName();