Problem/Motivation
After upgrading a site from D8 to D9 I removed upgrade status using:
$ <strong>drush updb && drush cr</strong>
[success] No pending updates.
[success] Cache rebuild complete.
$ <strong>composer remove drupal/upgrade_status</strong>
./composer.json has been updated
Running composer update drupal/upgrade_status
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 7 removals
- Removing drupal/upgrade_status (3.18.0)
- Removing laminas/laminas-servicemanager (3.20.0)
- Removing laminas/laminas-text (2.10.0)
- Removing mathieuviossat/arraytotexttable (v1.0.9)
- Removing mglaman/phpstan-drupal (1.1.29)
- Removing phpstan/phpstan (1.9.17)
- Removing phpstan/phpstan-deprecation-rules (1.1.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 7 removals
- Removing phpstan/phpstan-deprecation-rules (1.1.1)
- Removing phpstan/phpstan (1.9.17)
- Removing mglaman/phpstan-drupal (1.1.29)
- Removing mathieuviossat/arraytotexttable (v1.0.9)
- Removing laminas/laminas-text (2.10.0)
- Removing laminas/laminas-servicemanager (3.20.0)
- Removing drupal/upgrade_status (3.18.0)
Deleting web/modules/contrib/upgrade_status - deleted
But when running /update.php, I was presented with this
<h3>Missing or invalid module</h3>
The following module is marked as installed in the core.extension configuration, but it is missing:
upgrade_status
Review the suggestions for resolving this incompatibility to repair your installation, and then re-run update.php.
To resolve the issue, I used
composer require 'drupal/upgrade_status:^3.18'
and of course, update.php executed without any messages and 3.18 was again listed in the installed modules.
Out of curiosity I repeated the cycle several times, always with the same result: I can't get upgrade_status uninstalled.