Add a "Tombstone" / Permanent Skip mechanism for locally deleted files
Author: wangda-worldCreated Sep 25, 2026Updated Sep 25, 2026
Labelsenhancement
First of all, thank you for maintaining this amazing project! It is an essential tool for self-hosting setups. I would like to propose a new feature: a "Tombstone" (or Local Exclusion) mechanism that prevents icloudpd from re-downloading files that have been manually deleted from the local destination directory.
Currently, icloudpd acts as a strict mirror of iCloud. However, many users (including myself) use icloudpd alongside local self-hosted photo management tools like Immich, where the local directory serves as an external library.
In this workflow, users often curate and manually delete unwanted photos or clutter directly from the local storage. Unfortunately, because icloudpd only checks whether a file exists locally, the next sync cycle treats these locally deleted files as "missing" and re-downloads them from iCloud, undoing all user pruning.
I propose adding an optional flag (e.g., --enable-tombstone or --track-deletions) that:
1. Maintains a lightweight local ledger/database (e.g., SQLite or a simple JSON file) tracking files that have been successfully downloaded at least once.
2. If a file is missing from the local disk and exists in this local ledger, icloudpd recognizes it as a "user-deleted file" (Tombstone).
3. Skip downloading this file in future sync runs, even if it still exists on iCloud.
This feature would be a game-changer for anyone using icloudpd as a data source for local media servers (Immich, Plex, etc.) where local curation and storage management are desired without constantly fighting the cloud mirror sync.
Thank you for your time and consideration!Source: icloud-photos-downloader/icloud_photos_downloader