# npm-clean-cli

> Clean NPM Dependencies

Latest version **1.0.5** (published 2018-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-clean-cli
pnpm add npm-clean-cli
yarn add npm-clean-cli
bun add npm-clean-cli
```

Provides the command `npmclean`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-06-22 |
| First published | 2018-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | jae.b.bradley@gmail.com |
| Maintainers | jaebradley |
| Keywords | npm, npm clean, dependencies, package.json, cli |

## Links

- npm: https://www.npmjs.com/package/npm-clean-cli
- Repository: https://github.com/jaebradley/npm-clean-cli
- Homepage: https://github.com/jaebradley/npm-clean-cli#readme
- Issues: https://github.com/jaebradley/npm-clean-cli/issues
- npm.io page: https://npm.io/package/npm-clean-cli

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^6.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.0.0
- [commander](https://npm.io/package/commander.md) ^2.13.0
- [rimraf-promise](https://npm.io/package/rimraf-promise.md) ^2.0.0
- [child-process-promise](https://npm.io/package/child-process-promise.md) ^2.2.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2018-06-22
- 1.0.4 — 2018-05-13
- 1.0.3 — 2018-01-13
- 1.0.2 — 2018-01-13
- 1.0.1 — 2018-01-13
- 1.0.0 — 2018-01-13

## README

[![Build Status](https://travis-ci.org/jaebradley/npm-clean-cli.svg?branch=master)](https://travis-ci.org/jaebradley/npm-clean-cli)
[![codecov](https://codecov.io/gh/jaebradley/npm-clean-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/jaebradley/npm-clean-cli)
[![npm](https://img.shields.io/npm/v/npm-clean-cli.svg)](https://github.com/jaebradley/npm-clean-cli)
[![npm](https://img.shields.io/npm/dt/npm-clean-cli.svg)](https://github.com/jaebradley/npm-clean-cli)
[![Greenkeeper badge](https://badges.greenkeeper.io/jaebradley/npm-clean-cli.svg)](https://greenkeeper.io/)

# npm-clean-cli

## Introduction
There are times when you're working in an `npm` project and you'd like to start "fresh", from a dependency point of view i.e.<sup>1</sup>

* Blow away your `node_modules` directory
* [Clean your `npm` cache](https://docs.npmjs.com/cli/cache) 
  * Even if 
  > it should never be necessary to clear the cache for any reason other than reclaiming disk space
* And reinstall your `npm` dependencies

## Installation
```bash
npm install npm-clean-cli -g
```

## Usage

* Go to a directory that you'd like to "clean"
* Execute `npmclean`
  * Your directory must have a `package.json` file or else the additional commands won't run
  * If you do have a `package.json` file, the output should look something like
  ![alt-text](https://i.imgur.com/FbkcuGo.png)

## Footnotes
<sup>1</sup>
And yeah, I know that doing something like
```bash
rm -rf node_modules; npm clean cache --force; npm install
```
is not that verbose, and even if it is, you could assign it to a bash alias. But hey, I guess I like to overengineer things.

---
_Source: https://npm.io/package/npm-clean-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
