scour

Cleans up and optimizes SVG files by removing unnecessary data

brewmacoslinux
Try with needOr install directly
Source

About

SVG file scrubber

Commands

scour

Examples

Clean an SVG file with default optimization settings$ scour -i input.svg -o output.svg
Aggressively optimize SVG while preserving viewBox and metadata$ scour -i input.svg -o output.svg --enable-viewboxing --strip-xml-space
Clean SVG and display result to stdout$ scour -i input.svg