I'd like to see a list of all yarn linked packages everywhere on my computer and then run a command to unlink all of them. Can anyone help me out here?
Thanks!
Don't know if this is the yarn way to do things, but I just :
rm -rf ~/.config/yarn/link/*
You can create aliases
alias yarn-linked="find . -type l | grep -v .bin | sed 's/^\.\/node_modules\///'"
alias yarn-unlink-all="yarn-linked | xargs yarn unlink && yarn install --check-files"
Credit hubgit
Links are registered in ~/.config/yarn/link
. To reverse this process or unlink, simply use:
yarn unlink
or
yarn unlink [package]
EDIT:
You can try by add following in bash.rc:
alias yarn-linked="find . -type l | grep -v .bin | sed 's/^\.\/node_modules\///'"
alias yarn-unlink-all="yarn-linked | xargs yarn unlink && yarn install --check-files"
On Linux, they are stored in ~/.config/yarn/global
and you can remove with command yarn unlink [package]
Hope this will Help