Photo folders collect clutter: raw files you don’t want on your phone, export duplicates and the odd cache directory. You can leave them behind at upload time.
The CLI takes a glob pattern for things to skip:
immich upload --ignore "**/Raw/**" --recursive ~/Pictures/2025
Everything below any folder named Raw is skipped. The option can be repeated, so you can stack rules:
immich upload -i "**/Raw/**" -i "**/*.tif" --recursive ~/Pictures/2025
Always quote the pattern. Without quotes your shell expands the stars itself and the CLI receives something quite different from what you typed.
Pair it with a rehearsal, which shows what would be uploaded without sending anything:
immich upload --dry-run -i "**/Raw/**" --recursive ~/Pictures/2025
Check the count against what you expect. A pattern that is too broad fails silently, in the sense that the missing photos produce no error at all.
If you run the same import often, the IMMICH_IGNORE_PATHS environment variable sets the pattern without typing it each time, so a small wrapper script can carry your rules. Hidden files and folders are already left out unless you add --include-hidden.
My one hesitation: ignored files exist nowhere in Immich, so your backup of the originals has to cover them separately.
Further reading: Immich command line interface
Going deeper: Guide: link Prowlarr to Sonarr and Radarr once, and stop typing indexers into every app