1 2 3 4 5 6 7
#!/bin/sh set -e -u find -L ~ -type l -lname "$PWD/*" | while read -r linkPath; do rm "$linkPath" echo "$linkPath" done