You can build the list of filenames from the source directory and save them to the del.txt
file as null delimited entries like so:
find . -type f -printf "%f\0" > del.txt
Then dry-run test replacing /full/path/to/destination/
with the actual full path to the destination directory like so:
cat del.txt | xargs -0 -I {} find /full/path/to/destination/ -type f -name "{}"
If you are happy with the output, then delete the files with:
cat del.txt | xargs -0 -I {} find /full/path/to/destination/ -type f -name "{}" -delete
Alternatively, you can put the two command in a pipeline to build the list of file names, search for them and print a dry-run on-the-fly like so:
find . -type f -printf "%f\0" | xargs -0 -I {} find /full/path/to/destination/ -type f -name "{}"
And delete like so:
find . -type f -printf "%f\0" | xargs -0 -I {} find /full/path/to/destination/ -type f -name "{}" -delete
Notice: A null delimited list of filenames might not be easy to read by humans but is a much safer way for filenames that have a new line in them for example ... You can build a human friendly list for review purposes(i.e. for you to read and keep ... Don't use this with the above commands), like so:
find . -type f -printf "%f\n" > my_list.txt