Force delete files or folders using globs
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
- Maps the matching paths one-by-one to be included in
git rm -rfcommand
- Uses rimraf if the matching item isnʼt managed by
- These processes run concurrently
npm install force-del
const forceDel = ;;
Promise<Array> of deleted paths.
See supported minimatch patterns.
Current working directory.
true to match files only.
Other options are derived from the defaults of these libraries:
MIT © Lufty Wiranda