scour

Remove unnecessary data from SVG files to reduce file size.

brewmacoslinux
Try with needOr install directly
Source

About

SVG file scrubber

Commands

scour

Examples

shrink SVG file size by removing metadata$ scour -i input.svg -o output.svg
minimize SVG and make it prettier to read$ scour -i input.svg -o output.svg --pretty-print
clean up SVG with maximum compression settings$ scour -i input.svg -o output.svg --enable-viewboxing --enable-id-stripping
convert SVG colors to shorter hex format$ scour -i input.svg -o output.svg --shorten-colors
remove all comments and invisible elements from SVG$ scour -i input.svg -o output.svg --remove-descriptive-elements --strip-comments