Remove composer

前端 未结 5 902
囚心锁ツ
囚心锁ツ 2020-12-23 13:38

I installed composer while trying to install cakePhp, but the installation was not successful and I want to uninstall composer. I am not finding any way to do this.

相关标签:
5条回答
  • 2020-12-23 13:51

    Uninstall composer

    To remove just composer package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:

    sudo apt-get remove composer
    

    Uninstall composer and it's dependent packages

    To remove the composer package and any other dependant package which are no longer needed from Ubuntu Xenial.

    sudo apt-get remove --auto-remove composer
    

    Purging composer

    If you also want to delete configuration and/or data files of composer from Ubuntu Xenial then this will work:

    sudo apt-get purge composer
    

    To delete configuration and/or data files of composer and it's dependencies from Ubuntu Xenial then execute:

    sudo apt-get purge --auto-remove composer
    

    https://www.howtoinstall.co/en/ubuntu/xenial/composer?action=remove

    0 讨论(0)
  • 2020-12-23 13:58

    If you install the composer as global on Ubuntu, you just need to find the composer location.

    Use command

    type composer
    

    or

    where composer
    

    For Mac users, use command:

    which composer
    

    and then just remove the folder using rm command.

    0 讨论(0)
  • 2020-12-23 14:01
    curl -sS https://getcomposer.org/installer | sudo php
    sudo mv composer.phar /usr/local/bin/composer
    export PATH="$HOME/.composer/vendor/bin:$PATH"
    

    If you have installed by this way simply

    Delete composer.phar from where you've putted it.

    In this case path will be /usr/local/bin/composer

    Note: There is no need to delete the exported path.

    0 讨论(0)
  • 2020-12-23 14:11

    During the installation you got a message Composer successfully installed to: ... this indicates where Composer was installed. But you might also search for the file composer.phar on your system.

    Then simply:

    1. Delete the file composer.phar.
    2. Delete the Cache Folder:
      • Linux: /home/<user>/.composer
      • Windows: C:\Users\<username>\AppData\Roaming\Composer

    That's it.

    0 讨论(0)
  • 2020-12-23 14:11

    Additional information about removing/uninstalling composer

    Answers above did not help me, but what did help me is removing:

    1. ~/.cache/composer
    2. ~/.local/share/composer
    3. ~/.config/composer

    Hope this helps.

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