I have a package added to version control that I am trying to get rid of it.
I tired composer remove command but it's not working and giving me the following message:
composer remove drupal/domain
drupal/domain is not required in your composer.json and has not been removed
Gathering patches for root package.
Package "drupal/domain" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
- Installing drupal/domain (1.0.0-alpha14): Downloading (100%)
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
Generating autoload files
> Drupal\Core\Composer\Composer::ensureHtaccess
I made sure it's not referenced in composer.json any more as a requirement or a dependency of another package. Something weird is going on and I have no idea where.
I even tried clearing composer cache, removing the vendor directory and composer.lock file. Then ran composer install and again I see the package installed.
The only reference I see to it, is in installed.json
file. But that file is autogenerated by composer.
Update: I tried removing composer.lock and then run composer update --lock but that also did not work. Then I removed all the references to it and other packages that require it from composer.lock manually and ran composer install. This time it worked and did not re-download the package. I am not sure why.