# maxdirs

> Utility to trim the directories in a directory based on a maximum allowed, deletes oldest first

Latest version **0.0.8** (published 2014-10-09) · 0 weekly downloads

## Install

```sh
npm install maxdirs
pnpm add maxdirs
yarn add maxdirs
bun add maxdirs
```

Provides the command `maxdirs`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2014-10-09 |
| First published | 2014-04-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paul Devine [:devinesy] |
| Maintainers | devinesy |
| Keywords | directory, purge |

## Links

- npm: https://www.npmjs.com/package/maxdirs
- Repository: http://github.com/devinesy/maxdirs
- Homepage: https://github.com/devinesy/maxdirs
- Issues: https://github.com/devinesy/maxdirs/issues
- npm.io page: https://npm.io/package/maxdirs

## Dependencies (1)

- [rimraf](https://npm.io/package/rimraf.md) ~2.2.6

## Recent versions

- 0.0.8 (latest) — 2014-10-09
- 0.0.7 — 2014-04-25
- 0.0.6 — 2014-04-25
- 0.0.5 — 2014-04-25
- 0.0.4 — 2014-04-25
- 0.0.3 — 2014-04-25
- 0.0.2 — 2014-04-24
- 0.0.1 — 2014-04-24

## README

# maxdirs

A utility to trim the subdirectories in a directory based on a maximum, deletes oldest first.

## Installation

As a command line tool

$ [sudo] npm install -g maxdirs

As a libary
$ npm install maxdirs

## Command line

$ maxdirs <directory> <maxNumberOfSubdirectories>

If the number of sub-directories within directory exceeds maxNumberOfSubdirectories, the necessary count will be recursively deleted.

## As a library

$ var maxdirs = require('maxdirs');

$ maxdirs.purge(directory, maxNumberOfSubdirectories, callback);

callback takes (err, numberDeleted).

See test/purge.js for an example.

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