immich
immich copied to clipboard
library re-scan doesn't remove items which should be excluded by pattern
The bug
it looks like exclude patterns are considered only when adding new items to the database. But if patterns are added after adding items, then these items are not removed, if they physically still exists. It looks like re-scan will remove only items which really have been deleted. Patterns are ignored, when removing items.
Re-scan should consider exclude patterns and remove items which are excluded by pattern.
The OS that Immich Server is running on
? (docker on synology)
Version of Immich Server
1.91.4
Version of Immich Mobile App
not relevant
Platform with the issue
- [X] Server
- [ ] Web
- [ ] Mobile
Your docker-compose.yml content
not relevant
Your .env content
not relevant
Reproduction steps
1. add an external library
2. don't add exclude patterns
3. import items
4. add exclude patterns which will math something already imported
5. Re-Scan
6. check and see, if items matching the pattern have been removed or not
...
Additional information
I think, the re-scan checks only if items still exists, but patterns are ignored. That's why the issue happens only, if patterns are extended later and not at the beginning.
I had the same issue, I imported my library and forgot to exclude a folder.
I then added the exclude pattern, selected "Remove Offline Files" and they went away:
Does that help? Not sure if this feature existed when you first raised this. I also did a Re-Scan but I'm not sure if that's required or not so try "Remove Offline Files" only first as this might be sufficient.
@Batwam Your workaround did not worked for me. I added exclusion patterns after initial scan and even after full new scan and "remove offline files" the exclusion patterns are not applied and in my case raw files are still shown.
This is fixed with the latest release. Please retest and let me know if the issue persists.
Hi, I just tried to exclude tif files recursively in my external archive folder using /project_a/**/*.tif
I refreshed-scanned and tried to remove offline files to no avail.