Skip to main content

Shared CLI options

These flags apply to repack and bulk unless noted. JPEG/PNG/PDF are lossless unless --lossy, --pdf-profile, or a quality flag is set. Results that are not smaller are discarded unless --allow-grow.

FlagMeaning
--dryrunMeasure savings; do not modify files
--quiet / --verbose / --debugVerbosity
--no-imagesSkip image, video, and audio packers (including cover art). XML/JSON/PDF still run
--no-archivesSkip nested archive rewriting
--deep / --no-deepWalk inside archives (default: on); nested XML/JSON is minified
--min-savings PCTKeep result only if savings ≥ PCT
--min-size / --max-sizeSize filters (1MB, 100KB, …)
--backup / --backup-dirCopy source before rewriting
--output-dirWrite results here instead of in place
--compression-level 1-9Archive compression (default 9)
--jpeg-quality 1-100Implies lossy JPEG; also re-encodes images inside PDFs
--png-quality high|medium|lowImplies lossy PNG (pngquant)
--pdf-profileGhostscript Distiller preset: screen, ebook, printer, prepress, default (implies lossy PDF)
--lossyGhostscript PDF (/ebook unless --pdf-profile is set), jpegoptim -m, pngquant, lossy AVIF/HEIC
--wmv-losslessVideo CRF 0 (or VP9 lossless for WebM)
--convert-container / --no-convert-containerWMV/AVI/ASF → MP4 (default: convert)
--allow-growKeep output even if larger
--keep-metaKeep JPEG/PNG metadata (default strips EXIF/ICC)
--max-extract-sizeSkip archive extract if uncompressed size exceeds this (0 disables; default 8GB, also 100× the archive)
--ultraStronger lossless passes: Parquet zstd 22, zopflipng for PNG, mp3packer -z
--json / --csvMachine-readable output (mutually exclusive)
--log-file PATHAlso write CLI messages to a file
--statsExtra timing / counts
--progressProgress bar (rich if installed). repack is on for a TTY (--no-progress to hide); bulk needs --progress
--progress-interval NInterval when rich is not installed (default 10)

Lossy PDF defaults to Ghostscript /ebook (150 dpi) because /prepress barely shrinks scanned pages. Use --pdf-profile prepress for the old print-quality Ghostscript path. Lossless PDF walks embedded image streams when filerepack[pdf] is installed; encrypted or signed PDFs skip that step. DICOM is always lossless JPEG-LS (gdcmconv or dcmcjpls); --lossy does not apply.

Size arguments accept 1000, 1KB, 1.5MB, 2GB.

See repack, bulk, and Formats.