I have drush 5 installed on my VPS running CentOS 6. Drush was installed using PEAR. Can I just remove the drush directory and the simlinks and then install drush 7 using composer?

I have been searching for a way to uninstall drush, but all I get are tutorials to install it.

2 Answers 2


Drush doesn't really have any components that need to be "uninstalled". If the drush binary is somewhere on your PATH, then it's installed. If you just go ahead and install Drush 7 via composer, and insure that the newer Drush appears first in your PATH, then you can even leave Drush 5 on your system with no ill effects. You might even want to make a 'drush5' alias as a fallback, in case -- although personally, I run Drush 6 and Drush 7 on my system. I use Drush 7 for most things.


Uninstalling Drush using Pear

If Drush has been installed using Pear, it can be removed using the following command.

pear uninstall drush/drush

Installing Drush via Composer

For the most current install instructions, refer to the Drush GitHub page.

1) Add Composer's global bin directory to the system PATH (recommended):

sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
source $HOME/.bashrc

2) Install Drush

composer global require drush/drush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.