"cd" to the root of the Y directory
then (assuming the folder name is "X", enter):
" find . -name X -exec rm -rf {} \; " (and be extremely careful where you start this " find " from ... you only want to do this in your Y directory).
I do this all the time to remove old / unpacked repository directories (like " .svn "), which I suspect you can do as well.
And now, it would probably be a reasonable time for me to remind you that Time Machine is a great thing that is included on your Macintosh.
Michael dautermann
source share