https://github.com/luftywiranda13/force-del-cli
Force delete files or folders using globs
https://github.com/luftywiranda13/force-del-cli
cli cli-app del force force-del glob-pattern remove rimraf rm
Last synced: 4 months ago
JSON representation
Force delete files or folders using globs
- Host: GitHub
- URL: https://github.com/luftywiranda13/force-del-cli
- Owner: luftywiranda13
- License: mit
- Created: 2018-01-11T22:36:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T09:19:20.000Z (over 5 years ago)
- Last Synced: 2025-07-09T16:07:56.342Z (6 months ago)
- Topics: cli, cli-app, del, force, force-del, glob-pattern, remove, rimraf, rm
- Language: JavaScript
- Homepage:
- Size: 147 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# force-del-cli
> Force delete files or folders using [globs](https://github.com/isaacs/minimatch#usage)
[](https://www.npmjs.com/package/force-del-cli)
[](https://npm-stat.com/charts.html?package=force-del-cli&from=2016-04-01)
[](https://travis-ci.org/luftywiranda13/force-del-cli)
If the matching files or folders are managed by `git`, theyʼll be deleted and marked as `deleted` in staging area. Otherwise, theyʼll be deleted permanently (not to the trash).
## How does it work?
* Filters the files that should be deleted by using [globby](https://github.com/sindresorhus/globby)
* Maps the matching paths _one-by-one_ to be included in `git rm -rf` command
* Uses [rimraf](https://github.com/isaacs/rimraf) if the matching item isnʼt managed by `git`
* These processes run concurrently
## Installation
```sh
npm install --global force-del-cli
```
## Usage
```
$ force-del --help
Usage
$ force-del [ ...]
Options
--cwd= Current working directory
--verbose List deleted files
Examples
$ force-del silly-faces.jpg
$ force-del '*.jpg' '!too-cute.jpg'
$ force-del foo --cwd=../bar
```
## Related
* [force-del](https://github.com/luftywiranda13/force-del) – API for this module
* [remove-lockfiles](https://github.com/luftywiranda13/remove-lockfiles) - Prevent committing lockfiles
## License
MIT © [Lufty Wiranda](https://www.luftywiranda.com)