Can i delete unused frames in InDesign data merge?

Yes, you can! If you activate the process chain you can setup actions if the setup fails. You may delete the placeholder, the whole line or (in case of images) the rectangle.