Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

syq rm

Remove local files, files on an SSH server, or S3 objects. See Remove files and, for versioned buckets, Versions and deletion.

syq rm --src-dir old-output --dry-run -v

In scripts, SYQ_RM_OPTIONS adds arguments (see environment variables), and Removal records describes --results.

syq rm [OPTIONS] PATH...
syq rm [OPTIONS] --srcs-in DIR

SSH and transport

Argument / optionMeaning
--auth-from <auto|ssh|@NAME|HOST>Whose SSH access to use: this machine’s own (auto or ssh), or access approved by a receiving machine (@NAME) or SSH authorization provider (HOST); @NAME also authorizes S3 removal
--syq-path <PATH>Run the remote syq at PATH instead of syq’s automatically installed copy
--no-bootstrapRun the syq found in the remote $PATH instead of syq’s automatically installed copy
--pscope <PATH>Use the scope that syq persist on --ephemeral created at PATH, with its own connections and settings

Object storage

Argument / optionMeaning
--s3-endpoint <URL>S3 API endpoint URL (also AWS_ENDPOINT_URL_S3 or AWS_ENDPOINT_URL)
--s3-region <REGION>S3 signing region, used as given (otherwise syq asks AWS where the bucket is)
--s3-profile <NAME>AWS shared configuration/credentials profile
--s3-header <NAME: VALUE>Add a header before signing every S3 request (repeatable; S3-to-S3 metadata/tag overrides are refused)
--s3-retries <N>Retry each S3 request up to N times after a transient failure or throttling, 0..100 (default 10; 0 disables retries)
--s3-all-versionsPermanently remove all selected S3 object versions and delete markers
--s3-version-id <ID>Permanently remove one version or delete marker of one exact S3 key

Sources and selection

Argument / optionMeaning
--on <ENDPOINT>Removal endpoint ([USER@]HOST[:PORT] or s3://BUCKET); omitted means local
-C, --cwd <DIR>Resolve relative paths from DIR on the removal endpoint
--root <DIR>Confine resolution and removal beneath DIR
--followLike –follow-src; also follow symlinks in the –results path
--follow-srcFollow symlinks in –cwd, –root, and the parent directories of selected paths; a selected symlink itself is always removed as a link
--src <PATH>Select a non-directory object (repeatable)
--srcs-in <DIR>Recursively select a directory’s contents, keeping the directory (repeatable)
--src-non-dir <PATH>Select a non-directory object (repeatable)
--src-dir <DIR>Select a directory tree (repeatable)
--src-non-dirs <PATH>...Select several non-directory objects
--src-dirs <DIR>...Select several directory trees
--srcs <PATH>...Select several non-directory objects
[PATH]...Selected objects (shorthand for –src)

Preview and output

Argument / optionMeaning
-n, --dry-runPreview without changing files; remote setup may still install syq, and requested results files are still written
-v, --verbose...List removed paths
-q, --quietSuppress non-error messages

Performance tuning

Argument / optionMeaning
--performance-tuning <KEY=VALUE,...>Fix deletion concurrency: workers=N for filesystems or s3-requests=N for S3

Progress and results

Argument / optionMeaning
--progressShow progress even when stderr is not a terminal
--no-progressNever show the human progress display
--results <FILE>Write the machine-readable NDJSON result stream to FILE (created fresh; an existing file is refused)
--results-fd <FD>Write the result stream to an inherited file descriptor the caller opened (e.g. --results-fd 3 3>run.ndjson); must be above 2

Help and version

Argument / optionMeaning
-h, --helpShow common usage and options
-V, --versionPrint version
--help-allShow all options and details

Selection rules

Named paths, --src, and --src-non-dir remove only non-directories. Use --src-dir to remove a directory and its contents, or --srcs-in to empty it; both refuse a final symlink. Syq checks every selector first, so one naming the wrong kind of object stops the run before anything is removed; a missing one does not. rm has no filters.