diff --git a/setup.sh b/setup.sh
index 6911542..aaa4277 100755
--- a/setup.sh
+++ b/setup.sh
@@ -5,12 +5,14 @@ set -e
 yarn=yarnpkg
 
 pushd matrix-js-sdk
+$yarn unlink &>/dev/null || true
 $yarn link
 $yarn install
 popd
 
 pushd matrix-react-sdk
 $yarn link matrix-js-sdk
+$yarn unlink &>/dev/null || true
 $yarn link
 $yarn install
 popd
@@ -18,14 +20,10 @@ popd
 pushd element-web
 $yarn link matrix-js-sdk
 $yarn link matrix-react-sdk
-$yarn link
 $yarn install
 popd
 
 pushd element-desktop
-#$yarn link matrix-js-sdk
-#$yarn link matrix-react-sdk
-#$yarn link riot-web
 $yarn install
 ln -s ../element-web/webapp ./ || true
 popd