无法通过终端删除作曲家

2 php bash apache2

我使用 Ubuntu 15.10,我正在尝试删除 Composer,这是一个常见的 PHP 依赖管理器。我将它与 LAMP 一起删除以重新安装它们以进行练习(我对 Linux 非常陌生)。

似乎即使我运行了正式命令来删除它 composer global remove phpunit/phpunit,它也没有被删除......

这是我在终端中的输入和输出:

benwork@benwork-VirtualBox:/$ sudo composer global remove phpunit/phpunit
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Changed current directory to /home/benwork/.composer
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
phpunit/phpunit is not required in your composer.json and has not been removed
Package "phpunit/phpunit" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

小智 6

这是我卸载 Composer 的方法。我将首先将我的安装方式放在这里,然后是我的卸载和重新安装方式:

安装作曲家:

curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
export PATH="$HOME/.composer/vendor/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)

重新加载(终端)。

卸载

从您放置它的位置删除 composer.phar。

注意:无需删除导出的路径

重新安装

比重新安装时只执行两个第一阶段和最后一个阶段(因为第三阶段 - 导出路径已经完成,我没有以任何方式还原它)。