Delete photos directly from storage dir
I'm wondering if it's possible to delete photos directly from the folder where Immich has stored the photos. The reason I want to do this is because I have a lot of duplicate photos which I want to clean up with a third party tool (czkawka). I haven't looked into the reason why Immich hasn't labeled the photo's as duplicate and didn't upload them in the first place, but I guess it has to do with the EXIF data being different or something.
Is there a way to delete photos from the storage dir, such that the photos are also labeled as deleted in the database?
7 Replies
There isn't, no
FYI immich's duplicate detection currently only works on files that are identical
And by identical we mean exactly the same ie results in the same sha1 hash. Any modification to exif, etc. will result in the files being "different" as far as immich is concerned.
We're going to hopefully improve this in the future, but the easiest thing to do at the moment it probably clean up the files best you can, then re-import them into a new installation of immich.
wait is the sha-1 hash check implemented in 1.51.0?
It's been in there for a while
oh the discussion was about adding it client side then
Yeah, exactly. We already hash all files to do at least that level of deduplication, but we're wanting to add it client-side to optimize when/how we upload images. Especially on a new install/re-initialization - being able to safely know exactly what needs to be uploaded still.
Thanks for the detailed response! Good to know that the deduplication only works if the files are exactly the same. I'll deduplicate my library, will re-import via CLI, and set the apps to only upload new photos