After installing Drush on Mac it only downloads drupal 6x I am having issues installing Drush on Mac OSX 10.9.5. I have tried a variety of methods. The most successful have been;

Using homebrew

Drush 7 using composer

Each method had produced a version of Drush, however each appears old and drush dl drupal downloads the 6.x version, as does drush dl drupal 7.x.

Can you please suggest:

1) How to ensure old versions of drush are removed to ensure that a new installation goes smoothly.

2) The recommended method for installing the latest stable Drush version on Mac OSX 10.9.5

I had tried to delete the old drush version manually by removing folders. Now the composer installation method seems to fail as I get:

Pauls-iMac:~ Trotter$ composer global require drush/drush:dev-master
Changed current directory to /Users/Trotter/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing drush/drush (dev-master 78b1538)
    Cloning 78b15385ba97890dc3431790494f26d6be99ede9
    Failed to download drush/drush from source: The process "git clone --no-checkout 'git://github.com/drush-ops/drush.git' '/Users/Trotter/.composer/vendor/drush/drush' &amp;&amp; cd '/Users/Trotter/.composer/vendor/drush/drush' &amp;&amp; git remote add composer 'git://github.com/drush-ops/drush.git' &amp;&amp; git fetch composer" exceeded the timeout of 300 seconds.
    Now trying to download from dist
  - Installing drush/drush (dev-master 78b1538)
    Loading from cache

    Skipped installation of bin drush for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.php for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.bat for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.complete.sh for package drush/drush: name conflicts with an existing file


I can see that I don't have drush installed as what drush gives No such file or directory and drush info gives -bash: drush: command not found
Drush 7.x doesn't only download Drupal 7 of course. Drush 5 will download Drupal 7 too. Drush 7 is required for Drupal 8 and needs to be selected when installing with composer global require drush/drush:dev-master. Ps the recommended method is the composer method. This what I use on OS X 10.9.

Find old versions of drush with which drush. Check where they live withls -l [path from which drush]. Rinse and repeat until the only one left is in your home folder inside the hidden composer directory.

Check the version of the installed drush with drush --version

Make sure you don't have a .drushrc somewhere with a default core version specified.