# Removing unused frontend packages

[Depcheck](https://github.com/depcheck/depcheck) is a tool for analyzing the dependencies in a project to see: how each dependency is used, [which dependencies are useless](https://stackoverflow.com/questions/22675725/how-to-find-unused-packages-in-package-json), and which dependencies are missing from `package.json`.

The package can be installed and ran using the following commands:

```bash
npm install depcheck -g
yarn global add depcheck

depcheck
```

Or you can use npx (a package runner):

```bash
npx depcheck
```

One thing to note: be careful removing packages within the `devDependencies` list. Although the packages in this list is not installed with the `--production` flag, it is typically [used for packages that are only needed for local development and testing](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file).
