4

When I run brew install node I get:

[~]$ brew install node
Warning: node-0.12.0 already installed, it's just not linked

If I do this $ brew link --overwrite --dry-run node I get:

Would remove:
/usr/local/share/man/man1/node.1
/usr/local/lib/dtrace/node.d

Losing the man page I can live with but what about the lib?

Cigarillo
  • 327
  • 4
  • 9
  • 1
    "Remove" is the wrong verb, really; those files will be replaced with symlinks to the new version, which is what you want. So: yes, you should run `link --overwrite`. – Tim Smith Mar 12 '15 at 07:14

2 Answers2

2

After successful installation of node, it is required to link it. You can do this by running:

brew link homebrew/versions/node012

To get brief idea for why, you can read here.

Rohini Choudhary
  • 2,423
  • 2
  • 21
  • 31
0

Run brew unlink OLD-VERSION then brew link NEW_VERSION

Looks like only symlinks are created or removed not actually files. So lib will not be removed, but it will not be at that symlinked location anymore (at least with this method).

After running each command it will tell you how many symlinks are created or removed.

from man brew:

unlink formula: Remove symlinks for formula from the Homebrew prefix. This can be useful for temporarily disabling a formula: brew unlink foo && commands && brew link foo.

ln, link [--overwrite] [--dry-run] [--force] formula Symlink all of formula's installed files into the Homebrew prefix. This is done automatically when you install formula, but can be useful for DIY installations.

          If --overwrite is passed, Homebrew will delete files which already exist in the prefix while linking.

          If  --dry-run  or  -n is passed, Homebrew will list all files which would be linked or which would be deleted by brew link

--overwrite, but will not actually link or delete any files.

          If --force is passed, Homebrew will allow keg-only formulae to be linked.

Also found this: How can I brew link a specific version?

Community
  • 1
  • 1
Shwaydogg
  • 2,499
  • 27
  • 28