First, you can find your exact location of drush you installed. If you are Mac/Linux user, you can use below command.
which drush
In my computer, it shows that is an alias which maps to another location.
lrwxrwxrwx 1 root root 28 Dec 8 2015 drush -> /usr/local/share/drush/drush
If you list the files in /usr/local/share/drush
, you will find that there is .git folder.
-rw-r--r-- 1 root root 617 Dec 8 2015 box.json.dist
drwxr-xr-x 8 root root 4096 Dec 8 2015 commands
-rw-r--r-- 1 root root 1997 Jun 3 12:01 composer.json
-rw-r--r-- 1 root root 53683 Jun 3 12:01 composer.lock
-rw-r--r-- 1 root root 2469 Dec 8 2015 CONTRIBUTING.md
drwxr-xr-x 2 root root 4096 Jun 3 12:01 docs
-rwxr-xr-x 1 root root 4368 Jun 3 12:01 drush
-rw-r--r-- 1 root root 14013 Jun 3 12:01 drush.api.php
-rwxr-xr-x 1 root root 743 Dec 8 2015 drush.bat
-rwxr-xr-x 1 root root 1937 Jun 3 12:01 drush.complete.sh
-rw-r--r-- 1 root root 20 Jun 3 12:01 drush.info
-rwxr-xr-x 1 root root 4954 Dec 8 2015 drush.launcher
-rw-r--r-- 1 root root 23280 Dec 8 2015 drush_logo-black.png
-rwxr-xr-x 1 root root 221 Dec 8 2015 drush.php
drwxr-xr-x 2 root root 4096 Jun 3 12:01 examples
drwxr-xr-x 8 root root 4096 Jun 3 12:01 .git
-rw-r--r-- 1 root root 199 Jun 3 12:01 .gitignore
drwxr-xr-x 2 root root 4096 Jun 3 12:01 includes
drwxr-xr-x 3 root root 4096 Dec 8 2015 lib
drwxr-xr-x 3 root root 4096 Dec 8 2015 misc
-rw-r--r-- 1 root root 644 Jun 3 12:01 mkdocs.yml
-rw-r--r-- 1 root root 3152 Dec 8 2015 README.md
drwxr-xr-x 7 root root 4096 Jun 3 12:01 tests
-rw-r--r-- 1 root root 6523 Jun 3 12:01 .travis.yml
-rwxr-xr-x 1 root root 83 Dec 8 2015 unish.sh
drwxr-xr-x 16 root root 4096 Dec 8 2015 vendor
You can list all drush version with git tag
, then you pick one and checkout the version you like.
git checkout 8.0.5
If you don't have the version you want, just simply git pull
the latest commits.