# docker-clean

> Clean up unused docker containers and images

Latest version **1.0.3** (published 2014-10-23) · MIT license · 0 weekly downloads

## Install

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

Provides the command `docker-clean`.

## 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.3 |
| Published | 2014-10-23 |
| First published | 2014-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Mathias Buus |
| Maintainers | mafintosh |
| Keywords | docker, clean, cleanup, unused |

## Links

- npm: https://www.npmjs.com/package/docker-clean
- Repository: https://github.com/mafintosh/docker-clean
- Issues: https://github.com/mafintosh/docker-clean/issues
- npm.io page: https://npm.io/package/docker-clean

## Dependencies (3)

- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [after-all](https://npm.io/package/after-all.md) ^2.0.1
- [docker-remote-api](https://npm.io/package/docker-remote-api.md) ^4.2.0

## Recent versions

- 1.0.3 (latest) — 2014-10-23
- 1.0.2 — 2014-10-08
- 1.0.1 — 2014-10-08
- 1.0.0 — 2014-10-08
- 0.0.0 — 2014-10-08

## README

# docker-clean

Clean up unused docker containers and images

```
npm install docker-clean
```

Or to install the command line tool

```
npm install -g docker-clean
docker-clean --help
```

## Usage

``` js
var clean = require('docker-clean')

clean(function(err, result) {
  console.log('Cleaned up %d containers and %d images', result.containers, result.images)
})

// or to force remove running containers as well

clean({force: true}, function(err) {
  ...
})
```

Other options include

``` js
{
  host: 'optional-docker-host', // override $DOCKER_HOST
  images: false, // do not remove images
  containers: false, // do not remove containers
  force: true // also remove running containers
}
```

## License

MIT

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