I'm not particularly against JavaScript, but I'm not willing to install and use npm and several hundred dependencies.
All documentation for purgecss always includes postcss and a gazillion other packages I have never heard of.
Maybe something in Go, as a single executable?
still in js, but very fast, ~10KB (min), 0 dependencies, and does not require npm [1]:
however, it expects properly formed html and css; the parsers are quite unforgiving.
(i'm the author)
[1] https://github.com/leeoniya/dropcss/tree/master/dist
https://purgecss.com/CLI.html
Good luck being a employable lol