I've uninstalled software from brew (as I want to use a different version), using MacOS High Sierra 10.13.1

brew uninstall bowtie2

And downloaded the software from SourceForge instead, then copied the executables onto the $PATH

which bowtie2

> /usr/local/bin/bowtie2

However when I try to run the command


I get the error

> -bash: /usr/local/Homebrew/bin/bowtie2: No such file or directory

So it's still searching for the old path in the Homebrew folder. How do I change this?


Homebrew likes to create symlinks from /usr/local/bin/ to /usr/local/Cellar/.

You can see if this is the case by running: ls -l /usr/local/bin/bowtie2.

That should return a line with arrow syntax (->) like this:

/usr/local/bin/bowtie2 -> ../Cellar/bowtie2/<someversion>/bin/bowtie2

If that's the case, then you can just delete the broken symlink with: rm /usr/local/bin/bowtie2 (you may need to preface that with sudo depending on ownership of /usr/local/bin/. It's the broken symlink that is causing which to still show bowtie2 as being located in /usr/local/bin/.

You can then move the new binary for bowtie (that you downloaded from SourceForge) into /usr/local/bin/ or any other folder in your PATH.

  • Did this solve your your problem @tc13? – py4on May 24 '18 at 7:43

try to:

ls -la /usr/local/bin/ | grep bowtie2

as well as

find /usr/local | grep bowtie2

this will give you all info

binary is usually placed here (* is just to replace version number):


which in your case:



homebrew are unlink your symbolic links for you via "brew unlink bowtie2"

$ brew help unlink
brew unlink [--dry-run] formula:
    Remove symlinks for formula from the Homebrew prefix. This can be useful
    for temporarily disabling a formula:
    brew unlink formula && commands && brew link formula

    If --dry-run or -n is passed, Homebrew will list all files which would
    be unlinked, but will not actually unlink or delete any files.

$ brew unlink bowtie2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .