How to remove obsolete, unused modules?

Created on 10 February 2024, 11 months ago
Updated 20 February 2024, 10 months ago

What is the recommended method of removing unused and incompatible modules? The documentation offers no suggestions. Do we go in to the composer.json file and manually delete the entries? This seems like a bad idea. Tried using composer remove but that does not seem to work.

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Postponed: needs info

Version

4.0

Component

Documentation

Created by

🇺🇸United States ccbelcher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ccbelcher
  • Status changed to Postponed: needs info 11 months ago
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    What does not work about composer remove? https://getcomposer.org/doc/03-cli.md#remove-rm

  • 🇺🇸United States ccbelcher

    Hi Gábor,

    Thanks for the prompt reply. Here is an example of the output when I tried to remove contentimport:

    drupal/contentimport is not required in your composer.json and has not been removed
    ./composer.json has been updated
    Running composer update drupal/contentimport
    Loading composer repositories with package information
    Package "drupal/contentimport" listed for update is not locked.
    Updating dependencies
    Nothing to modify in lock file
    Installing dependencies from lock file (including require-dev)
    Nothing to install, update or remove

    Here is what Upgrade Status says:

    Content Import (contentimport) Contributed module Uninstalled 8.x-9.3 Incompatible N/A Up to date Incompatible Issues N/A

    I find composer to be very confusing, especially since it was installed while upgrading from 8 so might have old entries from the legacy project template. Not sure what the next step here would be. It would be great to have some guidance in the documentation.

    Thanks,
    -Chris

  • 🇺🇸United States ccbelcher

    I was able to do the upgrade my going in to the modules/ and themes/ directories and using the rm command to remove the uninstalled modules and themes. Perhaps the documentation could include this step?

    Trying to update activitytracker results in this:

    - drupal/tracker dev-1.0.x requires drupal/core ^8 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev] but these were not loaded, likely because it conflicts with another require.

    Not sure why version 8 is still there, as mentioned above.

    Thanks,
    -Chris

  • 🇭🇺Hungary Gábor Hojtsy Hungary

    The tricky thing about drupal/contentimport is I think it only had releases that have since been marked unsupported, so it does not show up in composer anymore. That's an interesting case, hm.

  • 🇭🇺Hungary Gábor Hojtsy Hungary

    Re activitytracker, that is not a project, tracker is, as shown in the error message: drupal/tracker. Why do you want to remove that?

Production build 0.71.5 2024