pkg-police is a CLI tool that lists out packages that are being used and those that aren't
Install globally npm i @ize-302/pkg-police -g
Navigate to the root of the repo you want to check and run pkg-police
to see results
This tool is just a fun side project and far from perfect. Here is a much better alternative: depcheck