Reference¶
This page describes the command line options of icloudpd.
Options are of three kinds:
Global options apply to the whole run and may appear anywhere on the command line:
--help,--version,--use-os-locale,--only-print-filenames,--log-level,--no-progress-bar,--threads-num,--domain,--watch-with-interval,--password-providerand--mfa-provider. Their entries below say “Global option.”User options are
--usernameand--password. Each--usernamestarts a new configuration.All other options belong to a configuration. Given after a
--username, they apply to that configuration only. Given before the first--username, they are defaults for all configurations. See Using Multiple Accounts and Config.
When options are combined in a way that can’t work, icloudpd prints a message and exits with
code 2 without doing anything. The rejected combinations are listed with each option.
--until-found XChecks assets, from most recently added to the oldest, for their local copies. Downloads if not present locally. The whole process stops once X number of subsequent checks result in a local file matching the remote.
This option is a useful optimization for incremental updates: only a small portion (X) of the existing local storage will be rechecked for existence, saving on local I/O. However, the process will not “fill the gaps” in local storage if any exist (and will not identify them).
With several
--albumoptions, the count applies to each album separately.Note
Assets are checked by the date they were added to iCloud, not by the date they were taken/created.
--recent XChecks X most recently added assets for their local copies. Downloads if not present locally.
This option is mostly useful while testing and experimenting with parameters to limit the volume of downloads.
With several
--albumoptions, X assets are checked in each album.Note
Assets are checked by the date they were added to iCloud, not by the date they were taken/created.
--album X,-a XSpecifies which album(s) to download.
When not specified, the whole asset collection is considered.
Changed in version 1.31.0: Option may be specified multiple times to download from different albums
An album in a folder is named by its path, as shown by
--list-albums, e.g.--album "Trips/2024/Italy".
--list-albums,-lLists all available albums.
Albums in folders are listed with the folder names in front, e.g.
Trips/2024/Italyfor the album “Italy” in the folder “2024” in the folder “Trips”. Folders themselves are not listed, since they hold no photos of their own.
--library XSpecifies which library to use.
Default:
PrimarySync(the personal library). Use the name exactly as printed by--list-libraries, e.g.SharedSync-…for a shared library.Note
Each configuration downloads from one library. To download from several, repeat
--usernamewith a different--libraryfor each, see Using Multiple Accounts and Config.Added in version 1.16.0: Shared library support added for iOS 16 shared libraries
--prune-orphansMoves unchanged, tracked local downloads out of the active mirror when their photos disappear from the selected shared library, including photos moved to a participant’s personal library without entering Recently Deleted. This is separate from
--auto-delete, whose behavior is unchanged.Added in version 1.33.0.
Use
--libraryto select a shared library and a dedicated--directorythat is not shared with other accounts, libraries, or downloader processes. Overlapping destinations in the same command are rejected.Files are tracked only when icloudpd writes them while this option is enabled. The first successful run saves a baseline in
.icloudpd-prune.json; it does not move anything. Later runs compare the library’s current photo IDs with the recorded IDs and quarantine only recorded files whose content has not changed. Actual download paths are recorded, including deduplicated filenames, Live Photo videos and newly created XMP sidecars. Existing untracked files are kept even if their names match a current photo. Old orphans predating tracking are not cleaned by this option.Each managed file is fingerprinted with its size and SHA-256. This reads new downloads once more, which can be noticeable for large videos. Candidates are hashed again before being moved; locally changed files are kept.
A separate, full inventory is read even when downloads are limited by
--recent,--until-found, albums or date/type filters. Hidden photos count as present, and files are retained while any asset referencing the same original remains in the library. Empty, count-mismatched, duplicate or changing-count listings, cancellation and failed downloads prevent pruning and baseline updates. Count checks cannot detect an Apple index that is consistently incomplete: a matching count is not proof that a photo was removed. For that reason, pruning never permanently deletes files.--dry-runreports candidates without changing files or tracking state.Files are moved to
.icloudpd-pruned/<unique-batch>/inside the destination, preserving their relative paths and never overwriting an earlier batch. Exclude.icloudpd-pruned/and its contents from external photo-library or gallery scans; do not assume every scanner ignores hidden directories. There is no automatic restoration or purge, and quarantine does not reclaim disk space. Periodically check its disk usage (for example,du -sh .icloudpd-prunedon POSIX systems) and review old batches before manually removing them. To restore a file, stop the downloader and move it from its batch back to the same relative path under the destination, without overwriting a newer file. If a photo reappears in iCloud, normal downloading may create another active copy; the quarantined copy is still retained. Review batches before removing them manually.The snapshot is bound to the account, library, time zone and output settings, not download limits or filters such as
--recentand--until-found. Context mismatches, busy or unsupported locks, inventory errors and tracking failures warn and skip pruning without failing or stopping the download run. They do not migrate or advance the baseline. Use a new dedicated directory for a different output configuration. Removing the snapshot explicitly resets tracking; previously downloaded files then become untracked and are kept. Do not edit the snapshot or run other downloaders against its destination.The option is rejected (exit code 2) without a shared library selected with
--library(the defaultPrimarySyncis not accepted), when combined with--delete-after-download,--keep-icloud-recent-days,--only-print-filenamesor--ignore-indexing-state, and when its--directoryis inside, or contains, the--directoryof another configuration in the same command. An empty shared library is deliberately not pruned; remove its local files manually if intended.An OS lock on
.icloudpd-prune.lockprevents overlapping pruning runs (flockon POSIX, byte-range locking on Windows). The OS releases it when the process exits, including after a crash; the lock file intentionally remains and does not need removing. Never delete it while another run might hold it. A filesystem that cannot provide the lock only disables pruning, not downloads. The snapshot is atomically replaced after a successful pruning run. Interrupted or failed runs can leave new files untracked or some files already quarantined, but no bytes are permanently deleted. Those untracked files are preserved rather than guessed to be safe to move.
--prune-orphans-adopt-existingExplicitly adopts an existing dedicated shared-library mirror on the first successful
--prune-orphansrun. Unlike normal tracking, this also handles old orphans that disappeared from iCloud before tracking was enabled.Added in version 1.33.0.
This declares that all recognized photo/video files and associated
.<media-extension>.xmpsidecars directly in--directorybelong exclusively to the selected shared-library mirror. Ownership cannot be inferred from filenames. Do not use it on a directory containing personal files, multiple libraries or files from other size/naming settings. Existing local edits are taken as the adoption baseline; they cannot be identified retroactively.Bootstrap is deliberately limited to
--folder-structure none, original photo and Live Photo video sizes, Live Photos enabled,--align-raw as-is,--file-match-policy name-size-dedup-with-suffixand--live-photo-mov-filename-policy suffix. Keep the same filename-cleaning and output settings that produced the existing mirror. Other layouts are not migrated.The option is rejected (exit code 2) without
--prune-orphans, and when any of these settings differ:--folder-structureother thannone, a--sizeother thanoriginal,--live-photo-sizeother thanoriginal,--skip-live-photos, or another--align-raw,--file-match-policyor--live-photo-mov-filename-policy.A validated full inventory, including Hidden, is matched using the downloader’s filename selection in an inspection-only mode, without fetching media or writing metadata. Matching is name-first, not size-first: current canonical names, known legacy
-originalnames and current size-suffixed collision names are retained even if EXIF rewriting or another tool changed their size. Live Photo videos and associated sidecars use the same protection. Only media whose name matches no current photo is quarantined in the bootstrap run.Ambiguous matches are deliberately retained: if multiple current photos share a filename, the base file is kept while any of them remains. This can preserve an old orphan with a colliding name rather than risk moving a current file. Adoption does not change the normal downloader’s size-based deduplication or fix its existing EXIF-related duplicate-download behavior.
Matching existing files are fingerprinted with their current size/SHA-256 and enrolled for future tracked pruning. This reads each adopted file, including large videos, once more. Non-media files, temporary files and subdirectories (including NAS metadata and previous quarantine batches) are left alone. Unsafe or symlinked candidates stop bootstrap with a warning rather than following them. Quarantine and restoration work as described above.
Preview using your existing command and unchanged settings, for example:
icloudpd --username user@icloud.com --library 'SharedSync-YOUR-LIBRARY-ID' \ --directory ./shared-library --folder-structure none --size original \ --prune-orphans --prune-orphans-adopt-existing --dry-run
Back up the mirror and review every candidate before repeating without
--dry-run. Once a baseline exists, this option does not rescan or adopt additional untracked media, even in watch mode. Remove it after successful adoption and keep--prune-orphansfor ordinary runs. If the snapshot is later removed while the bootstrap flag remains enabled, adoption will run again.
--list-librariesLists all libraries available for the account.
Added in version 1.16.0: Shared library support added for iOS 16 shared libraries
--ignore-indexing-stateContinues when iCloud keeps reporting the library as still indexing. Without it, icloudpd checks the indexing state up to 15 times, about 4 seconds apart, and stops with “Apple iCloud Photo Library has not finished indexing yet” if iCloud never answers that indexing has finished. iCloud can keep giving that answer for hours for a library that lists normally.
With this option, icloudpd continues after the last check if every answer said the library is still indexing, and logs a warning that the listing may be incomplete. The message at the end of the run says so too, instead of “All photos and videos have been downloaded”. Any other answer, such as an error or another state, still stops the run, with one exception below.
While iCloud reports this state, the listing may really be incomplete, so some assets may not be downloaded. A later run without the option, once iCloud reports that indexing has finished, picks up what is missing.
On some accounts iCloud’s indexing check answers FAILED, alone or between RUNNING answers, with an error that consists only of
CKCloudDBException:No index with requested name: CPLContainerRelation…(one or more, joined with,). The check then never finishes, but the listing doesn’t use that index, so the library lists completely. With this option such answers are accepted too. Because a run without the option never gets past this check, the message at the end of the run says that the option is needed on every run for that library, instead of suggesting a run without it. That message is logged at INFO level, because it’s the expected state for such accounts (the warning at the start already says the check is bypassed). A FAILED answer with any other error still stops the run.Can’t be combined with
--auto-delete,--delete-after-download,--keep-icloud-recent-daysor--prune-orphans(exit code 2), so that an incomplete listing can never lead to deletions.Added in version 1.34.0.
--watch-with-interval XRuns
icloudpdforever, periodically re-checking iCloud for changes (“watch”). The interval is specified in seconds, e.g. 3600 will be a 1-hour interval.Global option.
Too short an interval may trigger throttling on Apple’s side, although no evidence has been reported.
Can’t be combined with
--list-albums,--list-libraries,--only-print-filenamesor--auth-only(exit code 2).Added in version 1.10.0.
--versionReports the current version and commit hash & date that the version was built from, and exits.
Global option. Can’t be combined with
--help.Note
If
--use-os-localeis also specified, then the date is formatted according to the OS locale.
--use-os-localeInstructs
icloudpdto use the OS locale. If not specified (and by default), US English is used.Global option.
Added in version 1.22.0.
See also
The File Naming section discusses the affected behavior
--dry-runIf specified, no changes to local storage or iCloud remote storage are made.
Authentication will be performed and remote files will be checked against local storage. Any differences will be reported instead of performing downloads.
This parameter is useful for experimenting with new parameters.
Added in version 1.15.0.
--domain XAccess to Apple servers is blocked from mainland China. As an alternative, the iCloud service is available on an internal
.cndomain, which can be specified foricloudpdto work from mainland China.Global option. Default is
com.cnis the only other option available (--domain cn).Added in version 1.9.0.
--password X,-p XSpecifies the iCloud password to use for authentication. User option: it applies to the configuration started by the
--usernamebefore it. It is used only when--password-providerincludesparameter(the default does).Note
Supplying credentials through command line parameters is not considered a good practice since they can be logged and/or otherwise exposed. Consider using other password providers.
--directory X,-d XSpecifies the root folder where the folder structure will start and files will be downloaded.
Required for each configuration, unless
--auth-only,--list-albumsor--list-librariesis given. Without it,icloudpdexits with code 2.
--live-photo-directory XDownloads the video part of Live Photos to directory X instead of next to the photo. The folder structure is applied inside it in the same way as in
--directory, so with the default structure the video of a Live Photo taken on 4 November 2020 goes toX/2020/11/04/.--auto-deletealso looks for those videos there. Videos downloaded before the option was set stay next to the photos: they are not moved, and--auto-deletedoesn’t remove them.Can’t be combined with
--skip-live-photosor--prune-orphans.Added in version 1.34.0.
--screenshot-directory XDownloads screenshots to directory X instead of
--directory. The folder structure is applied inside it in the same way as in--directory.--auto-deletealso looks for screenshots there. Screenshots downloaded before the option was set stay in--directory: they are not moved, and--auto-deletedoesn’t remove them. Setting this on an existing library causes all screenshots to be re-downloaded into X.Screen recordings are videos, not screenshots, so they go to
--directory(or--video-directory). If an asset is ever marked as both a screenshot and a video,--screenshot-directorytakes precedence.Can’t be combined with
--skip-screenshotsor--prune-orphans.Added in version 1.35.0.
--video-directory XDownloads standalone videos to directory X instead of
--directory. The folder structure is applied inside it in the same way as in--directory.--auto-deletealso looks for videos there. Videos downloaded before the option was set stay in--directory: they are not moved, and--auto-deletedoesn’t remove them. Setting this on an existing library causes all videos to be re-downloaded into X.The video part of a Live Photo does not go to
--video-directory: it stays next to the photo in--directoryor goes to--live-photo-directory. Screen recordings are videos, so they go here. If an asset is ever marked as both a screenshot and a video,--screenshot-directorytakes precedence.Can’t be combined with
--skip-videosor--prune-orphans.Added in version 1.35.0.
--file-match-policy XSpecifies an algorithm (policy) to match remote files to local files:
name-size-dedup-with-suffix(default) orname-id7.Added in version 1.20.0.
See also
Discussion of File Naming and Deduplication
--temp-suffixSuffix of the temporary files that are used while a download is in progress, and while
--prune-orphanssaves its snapshot. Default is.part. Change it if the destination refuses files with this suffix, for example a WebDAV mount of Nextcloud. The suffix must start with a dot, and suffixes that end with a media or.xmpextension are rejected, so a leftover temporary file is never mistaken for a photo. Files left by an interrupted download are only resumed when the same suffix is used again.Added in version 1.34.0.
--username X,-u XSpecifies the Apple ID (email address) used for authenticating to iCloud. The value is converted to lower case.
Required: without a
--username,icloudpddownloads nothing.Each
--usernamestarts a new configuration. Options after it, up to the next--username, apply to that configuration only. May be used multiple times to introduce different configurations and/or accounts. See Using Multiple Accounts and Config.Changed in version 1.32.0: Option may be specified multiple times
--adp-web-accessRequests iCloud web access consent after authentication, which is required for accounts with Advanced Data Protection (ADP). Needs
Access iCloud Data on the Webenabled on the account. The first run asks you to approve a notification on an Apple device. See ADP.Added in version 1.33.0.
--auth-onlyPerforms authentication, persists authentication results (tokens/cookies), and exits without processing assets.
Added in version 1.17.0.
--cookie-directory XCustomizes the folder used for persisting authentication results (cookies/tokens). If not specified,
~/.pyicloudis used.
--size XCustomizes the size of the asset to download:
original(default),medium,thumb,adjustedoralternative. May be specified multiple times to download several sizes.Changed in version 1.19.0: Option may be specified multiple times.
adjustedandalternativeaddedSee also
Details on Asset sizes
--force-sizeIf specified, only the requested size will be downloaded. Otherwise, the
originalsize will be downloaded instead of the missing size.See also
--live-photo-size XCustomizes the size of the video part of Live Photos to download:
original(default),mediumorthumb.Changed in version 1.33.0:
thumbworks; before, it stoppedicloudpdat startup
--skip-videosIf specified, video assets will not be processed.
Can’t be combined with
--skip-photosin the same configuration (exit code 2).
--exclude-filenameAssets whose filename matches the pattern are not processed, for example
--exclude-filename "IMG_12*.JPG". The pattern can use*,?and[...]and is matched without regard to case, so[a-z]also matches upper case letters.The pattern is matched against the asset’s filename, with
--file-match-policyapplied, and a match skips the whole asset, including its Live Photo video and RAW file. Files icloudpd derives from the asset aren’t matched on their own:*.MOVdoesn’t skip the video of a Live Photo, size suffixes like-mediumare never matched, and withname-id7the pattern has to allow for the id, e.g.IMG_1234*.JPG.The option can be repeated. Patterns given before the first
--usernameapply to every user and are combined with the user’s own patterns. Like other filters, it leaves the excluded assets alone when deleting from iCloud.Added in version 1.34.0.
--skip-photosIf specified, photo assets will not be processed.
Can’t be combined with
--skip-videosin the same configuration (exit code 2).Added in version 1.30.0.
--delete-list FILEDelete from iCloud the assets listed in
FILE, and download nothing. Every line isFILENAME<TAB>SIZE<TAB>DATE, withSIZEin bytes andDATEthe creation date of the asset, either a unix timestamp in seconds or an ISO 8601 date and time with a UTC offset orZ(for example2024-01-31T14:05:09+01:00). A date without an offset, a value such as20240101, and dates before 2001 or after 2100 are rejected, because they would be read in a time zone that depends on the machine or are no photo dates. Lines starting with#are ignored.An asset matches when its original file name and size are equal and its own date is within two minutes of the
DATE. The name may also carry the id suffix of--file-match-policy name-id7(accepted whether or not that option is used). Every line is kept, so two photos that share name and size can be told apart by their dates. A line that asks for a photo another line already asked for is reported and the photo is deleted once.icloudpdknows where to look: it reads the newest 100 assets first and then searches by date, so even a large library is checked within seconds. The search assumes that iCloud lists the library newest first by capture date, which is not guaranteed; an entry that is not found there is therefore looked for in the whole library (once for all such entries, with a warning in the log) before it is reported as not found, which can take minutes for a large library.Everything is checked before
icloudpdsigns in: a missing or malformed file, a list longer than--delete-list-max, and options that would be ignored (--album,--recent,--until-found,--skip-videos,--skip-photos,--skip-live-photos,--skip-created-before,--skip-created-after,--skip-screenshots,--exclude-filename,--live-photo-directory,--screenshot-directory,--video-directory,--xmp-sidecar-only,--ignore-indexing-state,--prune-orphans,--auto-delete,--delete-after-download,--keep-icloud-recent-days,--only-print-filenames,--auth-only) end with exit code 2.--delete-listcannot be combined with--watch-with-interval, because the list would run again every interval.--directoryis not needed.The exit code is 0 only when every line was dealt with. Entries that are not found, are ambiguous (several assets match) or that iCloud refuses to delete (it asks to try again later, or the request fails) end with exit code 1; a failing entry does not stop the others. The last log line is a summary, for example
Delete list summary: deleted=3 not_found=1 failed=0 ambiguous=0(would_delete=with--dry-run).Be aware of what one line deletes:
It deletes the whole asset. The video of a Live Photo goes with it, and the JPG line of a RAW+JPEG pair deletes both.
Lines for the
.MOVof a Live Photo, for the RAW file of a pair or for an edited version never match, because the size is that of the original.In a shared library the deletion applies to every participant.
Deleted assets go to Recently Deleted in iCloud and can be restored there for about 30 days. Combine with
--dry-runto see what would be deleted.Added in version 1.35.0.
--delete-list-allow-undatedAccept lines without a
DATEin the file given with--delete-list. Such a line matches by file name and size alone and needs the whole library to be read. Once the photo it means is gone (deleted earlier, on a device or by a previous run), another photo with the same name and size would match and be deleted, so use this only for a list you have just made and have checked with--dry-run.Added in version 1.35.0.
--delete-list-max NRefuse to run if the file given with
--delete-listhas more thanNentries. Default: 50.Added in version 1.35.0.
--skip-screenshotsLeaves out photos that iCloud marks as screenshots, the ones in the Screenshots album of Photos. Screen recordings are videos and are not left out.
Added in version 1.34.0.
--skip-live-photosIf specified, the video part of Live Photos is not downloaded. The still image is still downloaded.
--auto-deleteIf specified, assets deleted in iCloud (actually moved to the Recently Deleted album) will also be deleted locally.
Can’t be combined with
--keep-icloud-recent-daysor--delete-after-download(exit code 2): the assets they move to Recently Deleted would then be deleted locally as well. Can’t be combined with--ignore-indexing-stateeither (exit code 2).See also
--delete-after-downloadIf specified, assets downloaded locally will be deleted in iCloud (actually moved to the Recently Deleted album). Deprecated, use
--keep-icloud-recent-daysinstead.Can’t be combined with
--auto-delete,--keep-icloud-recent-days,--prune-orphansor--ignore-indexing-state(exit code 2).Note
If remote assets were not downloaded, e.g., because they were already in local storage, they will NOT be deleted in iCloud.
Added in version 1.8.0.
Deprecated since version 1.26.0.
--keep-icloud-recent-days XDeletes assets in iCloud after they were downloaded or confirmed to be present locally, except for the ones taken within the specified number of days. If set to 0, all photos will be deleted from iCloud.
If any filters are used, e.g.,
--skip-videos, then assets excluded from processing by filters are not subject to deletion from iCloud. For example, running icloudpd with--skip-videoson a huge iCloud collection of videos will download and delete nothing.The timestamp when the asset was taken (aka “created date”) as reported by iCloud is used for calculating the age of the asset. For example, an asset taken in 2000, but added to iCloud in 2024, will be 25 years old in 2025. The same timestamp is used for the folder structure in the current system.
Assets for which iCloud reports no creation date are not deleted, because their age is unknown. icloudpd logs a warning for each of them.
If the parameter is not specified, then nothing is deleted from iCloud.
Can’t be combined with
--auto-delete, which would delete the local copies of the assets this moves to Recently Deleted, or with--delete-after-download,--prune-orphansor--ignore-indexing-state(exit code 2).Only assets that the run looks at are considered for deletion. With
--recent, assets beyond the first X are not checked, and with--until-found, assets after the point where the run stops are not checked, so they stay in iCloud. icloudpd logs a warning at startup when these are combined.Added in version 1.26.0.
--only-print-filenamesIf specified, no downloading will occur, but only file paths will be printed in the output (no other info goes into the output either). Nothing is deleted, locally or in iCloud.
Global option. Can’t be combined with
--watch-with-intervalor--prune-orphans(exit code 2).See also
--folder-structure XSpecifies the subfolder naming scheme, applied to the creation date of each asset. Default:
{:%Y/%m/%d}. Usenoneto put all files directly into--directory. A format that can’t be applied to a date is rejected at startup.See also
Details in the Folder structure section.
--set-exif-datetimeIf specified, the date/time the asset was taken/created is written into the EXIF tags
DateTime,DateTimeOriginalandDateTimeDigitizedof newly downloaded JPEG files that have noDateTimeOriginaltag yet. Other files are not changed.
--no-progress-barIf specified, the progress bar is suppressed. This is valuable when streaming output to a file. The progress bar is also suppressed when no terminal is attached.
Global option.
--log-level XSets the level of log messages:
debug(default),infoorerror.Global option. Ignored with
--only-print-filenames, which turns off all log messages.
--keep-unicode-in-filenamesIf specified, Unicode characters will be preserved in filenames. Otherwise they are removed (default).
Added in version 1.18.0.
--live-photo-mov-filename-policy XCustomizes the naming of the video portion of live photos:
suffix(default) adds_HEVCto the name,originalkeeps the name as is.Added in version 1.18.0.
See also
Details in the Live Photo section.
--align-raw XCustomizes the treatment of RAW+JPEG assets:
as-is(default),originaloralternative.Added in version 1.19.0.
See also
Details in the RAW+JPEG section.
--password-provider XCustomizes the intake of the password for iCloud authentication:
parameter,keyring,consoleorwebui. May be specified multiple times; providers are tried in the given order. Default:parameter,keyring,console.Global option.
Added in version 1.20.0.
Changed in version 1.21.0:
webuiaddedSee also
Details in the Password providers section.
--mfa-provider XCustomizes the intake of the multi-factor authentication (MFA) code for iCloud authentication:
console(default) orwebui.Global option.
Added in version 1.21.0.
See also
Details in the MFA providers section.
--webui-host XAddress the web UI server listens on. Default:
0.0.0.0(all network interfaces). Use127.0.0.1to allow access from this computer only; the web UI is not password protected.Added in version 1.34.0.
--webui-apiServes a read-only status API from the web UI server, so that other programs can follow what
icloudpddoes. Off by default. The API is only available while the web UI server runs, which needswebuias MFA provider and/or Password Provider. Without it,icloudpdlogs a warning and the option does nothing.See also
The endpoints are described in the Status API section of the web UI page, and the exposure in Security.
Added in version 1.35.0.
--xmp-sidecarExports additional data as XMP sidecar files (default: don’t export).
Added in version 1.25.0.
--xmp-sidecar-onlyOnly writes the XMP sidecar files, next to where the photos and videos would be downloaded, without downloading them. Useful to add sidecars to a copy of the library that uses the same folder layout and file names as icloudpd. The sidecars follow icloudpd’s own layout, so they won’t land next to a copy with a different structure (e.g. a camera
DCIMfolder). Implies--xmp-sidecar.Cannot be combined with
--delete-after-download,--keep-icloud-recent-days,--prune-orphans,--until-foundor--only-print-filenames. Without the media files, two assets with the same name in one folder share a sidecar, so prefer a--folder-structurethat keeps them apart.Added in version 1.34.0.
--smtp-username X,--smtp-password X,--smtp-host X,--smtp-port X,--smtp-no-tlsSettings for email notifications when two-factor authentication is required. An email is sent whenever iCloud asks for a code, if
--smtp-usernameor--notification-emailis set.--smtp-username,--smtp-password: account for the SMTP server.icloudpdlogs in only when both are set.--smtp-host: defaultsmtp.gmail.com.--smtp-port: default587.--smtp-no-tls: turns off STARTTLS, which is used by default.
--notification-email X,--notification-email-from XSettings for email notification addressing.
--notification-email: recipient. Default: the SMTP username.--notification-email-from: sender. Default:iCloud Photos Downloader <SMTP username>, or the recipient if there is no SMTP username.
--notification-script XPath to a script that is run, without arguments, whenever iCloud asks for a two-factor authentication code, before
icloudpdwaits for the code.
--skip-created-before XDoes not process assets created before the specified timestamp. The timestamp is an ISO date or date-time, e.g.,
2025-06-01or2025-06-01T12:00:00+02:00, or an interval in days backwards from the current date, e.g.,5d(5 days ago). Only days are supported as interval unit. If an ISO timestamp has no time zone, the local time zone is used.Added in version 1.28.0.
Note
The date is when the asset was created, not when it was added to iCloud.
--skip-created-after XDoes not process assets created after the specified timestamp. The timestamp is an ISO date or date-time, e.g.,
2025-06-01or2025-06-01T12:00:00+02:00, or an interval in days backwards from the current date, e.g.,5d(5 days ago). Only days are supported as interval unit. If an ISO timestamp has no time zone, the local time zone is used.Added in version 1.29.0.
Note
To process a date range, combine it with
--skip-created-before, which sets the start of the range:--skip-created-before 2025-04-01 --skip-created-after 2025-10-01processes assets created between April 1 and October 1, 2025.--skip-created-beforemust be earlier than--skip-created-after, otherwiseicloudpdexits with code 2.Note
The date is when the asset was created, not when it was added to iCloud.
--help,-hShows a summary of all options and exits. Also shown when
icloudpdis run without any options.Global option. Can’t be combined with
--version.
--threads-num XHas no effect: downloads always use one thread. Kept for compatibility and will be removed in a future version.
Global option.
Deprecated since version 1.7.0.