Subtract files in folder A from folder B
You can use a simple bash script to do this::

for file in *.*; do if [ -f "/FolderA/${file}" ]; then rm "/FolderB/$file"; fi; done;


This script assumes you are already in FolderB, which is where you want to delete the files that already exist in FolderA.

You can tweak it if you know the extension of the image files (ie, .png, .gif, etc) and you have the exact folder names. So instead of *.* you can use *.png or *.gif.

A MUCH safer version:

for file in *.*; do if [ -f "/FolderA/${file}" ]; then mv "/FolderB/$file" ~/.Trash; fi; done;


This will move the file to the Trash.  Using rm is a one-way-street.  Once you hit enter on an rm command, it's done; that file is gone forever.  Move to the Trash to ensure you got the results you are looking for.