How can I erase all photos on my iOS 11 device that can't be removed with Image Capture trick? I have over 17,000 photos sync'd from my Mac on to my iPhone running iOS 11. As seems these days, the synced photos do not give you the option of deleting them from the phone (yes, I understand this wouldn't delete them from my Mac). The problem is that I don't want all these photos on there, I only want the last few weeks or so but I think iTunes and the phone are confused as I'm not sure how to get rid of the extraneous photos.

To be clear, the photos in question are ones previously sync'd to the phone from iTunes on a Mac that runs the Photos.app; there are no photos in the camera roll. Photos that have been sync'd do not give the option to be deleted, that privilege only exists for those in the current Camera Roll. As well, the Image Capture trick suggested does not work because that method only addresses pictures in the Camera Roll; it does not see the sync'd photos.

In the past, I should have been able to simply uncheck the "Sync Photos" box and accept the "Remove from Phone" button, sync and then see the photos disappear from the phone. However, that doesn't do the trick - the photos are still there. I've tried re-enabling and sync'ing with a subset of photos which appears to complete successfully, but then when I try to uncheck and "Remove from Phone" and sync again, they still don't delete.

In the past you used to be able to go into the Settings app and under storage for Photos you could press a button to delete all photos from the phone; it doesn't appear to exist as an option anymore, only "put everything on the cloud" which is something I do NOT want to do. It just seems that iTunes sync doesn't try to remove the old photos like it doesn't understand that they're there.

Is there any way to delete all the photos on my phone or do I have to completely wipe my phone and start all over again? Strangely, the last backup iTunes took of my phone was nearly 3 months ago and the button to manually do one is grayed out thus I'm a little hesitant to do the restore.
I found the answer and it requires some surgery by deleting the sqlite databases that the iPhone keeps for synced photos, the photos thumbnails and the photos themselves. I've documented the steps in a blog page here: http://dronefone.com/brian/blog/Entries/2018/3/7_Removing_Synced_Photos_from_iOS.html

Note this works for iOS 12 as well.