Recently I centralised all my photos from various sources to iCloud, so I can access them on my iPhone, Mac and have them saved and have full control over them. However, in the process, I inadvertently created a lot of duplicates. I made some Python scripts to analyse and tag the duplicates so that now I have a list of file paths to images on my Mac. For example, one such file path looks like this:
The problem now is if I try to delete these directly, iCloud will eventually download them back. Is there some way I can programmatically delete these images, or put them into an album (for easy deletion in the Photos app)?