How to remove globally a package from Composer?

前端 未结 2 1102
挽巷
挽巷 2021-01-30 04:35

I ran this command to install globally PHPUnit:

composer global require \'phpunit/phpunit=3.7.*\'

Now I want to uninstall globally

相关标签:
2条回答
  • 2021-01-30 05:14

    Also you can use another way

    cd $HOME/.config/composer
    

    And in composer.json file remove some require positions

    After all execute composer update This is a long way, but more clear

    0 讨论(0)
  • 2021-01-30 05:16

    To remove a globally installed package run:

    composer global remove phpunit/phpunit
    

    global command lets you to run many commands like install, require or update as if you were running them from the COMPOSER_HOME directory.

    Read the related documentation here: http://getcomposer.org/doc/03-cli.md#global

    COMPOSER_HOME depends on your system (on Linux it's ~/.composer), see http://getcomposer.org/doc/03-cli.md#composer-home for more details.

    0 讨论(0)
提交回复
热议问题