# sindresorhus/trash-cli

Move files and folders to the trash

Repository: https://github.com/sindresorhus/trash-cli
Canonical: https://ross.abutalabs.com/products/sindresorhus-trash-cli
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-02-02T05:21:20+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 65, release rhythm 68, longevity 100
- inputs: {"age_days": 3977, "days_push": 212, "days_rel": 212, "gap_med": 6, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1412, forks 39 (observed 2026-08-28T04:04:39.119302+00:00)

## What it is
A Node.js command-line tool that moves files and folders to the system trash instead of permanently deleting them, supporting paths and glob patterns. It works on macOS, Linux, and Windows and can be aliased over rm for safer deletion.

## Use cases
- safely delete files from the command line
- replace rm with a reversible trash command
- trash files matching glob patterns
- recover accidentally deleted files from the trash
- move folders to the recycle bin on Windows

## When to choose
- you want reversible, safer deletion instead of permanent rm
- you need cross-platform trash support from the terminal
- you want to delete files by glob pattern safely

## When to avoid
- you need to permanently free disk space immediately
- you are in a headless environment without a trash system
- you need programmatic API usage rather than a CLI

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, file-system
- domain: developer-tools, files
- platform: windows, cli
- tags: trash, safe-delete, file-management, glob-patterns, rm-alternative, command-line, macos, linux, nodejs

## Member repositories
- sindresorhus/trash-cli (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:39.119302+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:21.855765+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/trash-cli (fetched 2026-08-28T04:04:39.119302+00:00, sha e56fdb1b34ea)
  - registry_npm: https://registry.npmjs.org/trash-cli (fetched 2026-08-29T11:51:29.187773+00:00, sha 2b01275d3f49)
- Data as of 2026-08-30T08:39:29.467469+00:00.
