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